diff --git a/.github/workflows/actions/quarto-dev/action.yml b/.github/workflows/actions/quarto-dev/action.yml index 88b737e828f..63690b7dc75 100644 --- a/.github/workflows/actions/quarto-dev/action.yml +++ b/.github/workflows/actions/quarto-dev/action.yml @@ -8,10 +8,9 @@ runs: uses: actions/cache@v4 with: path: ./src/resources/deno_std/cache - key: ${{ runner.os }}-deno_std-1-${{ hashFiles('./src/resources/deno_std/deno_std.lock', './package/scripts/deno_std/deno_std.ts') }} + key: ${{ runner.os }}-deno_std-2-${{ hashFiles('./src/resources/deno_std/deno_std.lock', './package/scripts/deno_std/deno_std.ts') }} restore-keys: | - ${{ runner.os }}-deno_std-1- - ${{ runner.os }}-deno_std- + ${{ runner.os }}-deno_std-2- - name: Configure Quarto (.sh) if: runner.os != 'Windows' diff --git a/configure.cmd b/configure.cmd index ccbbae63b81..a2c06fd2cf7 100644 --- a/configure.cmd +++ b/configure.cmd @@ -69,30 +69,14 @@ echo Configuration done POPD -if "%CI%" NEQ "true" ( - echo Revendoring quarto dependencies - - @REM for /F "tokens=2" %%i in ('date /t') do set today=%%i - @REM RENAME src\vendor src\vendor-%today% - @REM pushd src - @REM echo Vendor phase 1 - @REM %QUARTO_DENO% vendor quarto.ts %QUARTO_ROOT%\tests\test-deps.ts --importmap=import_map.json - @REM if ERRORLEVEL NEQ 0 ( - @REM popd - @REM echo deno vendor failed (likely because of a download error). Please run the configure script again. - @REM RMDIR vendor - @REM RENAME vendor-${today} vendor - @REM exit 1 - @REM ) - @REM popd - @REM %QUARTO_DENO% run --unstable --allow-all --importmap=src\import_map.json package\src\common\create-dev-import-map.ts -) +REM download typescript dependencies +CALL package\scripts\vendoring\vendor.cmd ECHO Downloading Deno Stdlib CALL !QUARTO_PACKAGE_PATH!\scripts\deno_std\download.bat -SET QUARTO_DENO_EXTRA_OPTIONS="--reload" IF EXIST !QUARTO_BIN_PATH!\quarto.cmd ( + SET QUARTO_DENO_EXTRA_OPTIONS=--reload CALL "!QUARTO_BIN_PATH!\quarto" --version ) diff --git a/configure.sh b/configure.sh index e0461c931e3..859f3a3f769 100755 --- a/configure.sh +++ b/configure.sh @@ -29,44 +29,45 @@ function download() { QUARTO_VENDOR_BINARIES=${QUARTO_VENDOR_BINARIES=true} -DENO_BIN=${QUARTO_DENO=$QUARTO_BIN_PATH/tools/$DENO_DIR/deno} +DENO_BIN=${QUARTO_DENO=$QUARTO_BIN_PATH/tools/$DENO_ARCH_DIR/deno} if [[ "${QUARTO_VENDOR_BINARIES}" = "true" ]]; then - DENO_VERSION_NO_V=$(echo $DENO | sed 's/v//') - if [[ (! -f "$DENO_BIN") || $("$DENO_BIN" --version | grep $DENO_VERSION_NO_V) == "" ]]; then + DENO_VERSION_NO_V=$(echo "$DENO" | sed 's/v//') + if [[ (! -f "$DENO_BIN") || $("$DENO_BIN" --version | grep "$DENO_VERSION_NO_V") == "" ]]; then # Ensure directory is there for Deno echo "Bootstrapping Deno..." - rm -rf $QUARTO_DIST_PATH + rm -rf "$QUARTO_DIST_PATH" ## Binary Directory mkdir -p "$QUARTO_BIN_PATH/tools" - cd $QUARTO_BIN_PATH/tools + pushd "$QUARTO_BIN_PATH/tools" # Download Deno for DENOFILE in $DENOFILES; do download "$DENOURL/$DENO/$DENOFILE" "$DENOFILE" - unzip -o $DENOFILE - - mkdir -p $DENO_DIR - mv deno $DENO_DIR - rm $DENOFILE + unzip -o "$DENOFILE" + mkdir -p "$DENO_ARCH_DIR" + mv deno "$DENO_ARCH_DIR" + rm "$DENOFILE" done # we create a symlink here so that we need only one quarto-cli.code-workspace file - ln -s $DENO_DIR/deno deno + ln -s $DENO_ARCH_DIR/deno deno # If a canary commit is provided, upgrade to that - if [ ! -z "$DENO_CANARY_COMMIT" ]; then + if [ -n "$DENO_CANARY_COMMIT" ]; then echo [Upgrading Deno to Canary] - ./deno upgrade --canary --version $DENO_CANARY_COMMIT + ./deno upgrade --canary --version "$DENO_CANARY_COMMIT" fi # write deno version file for later use - mkdir -p $QUARTO_BIN_PATH/../config - echo $DENO > $QUARTO_BIN_PATH/../config/deno-version + mkdir -p "$QUARTO_BIN_PATH/../config" + echo "$DENO" > "$QUARTO_BIN_PATH/../config/deno-version" + + popd fi - export DENO_BIN_PATH=$QUARTO_BIN_PATH/tools/$DENO_DIR/deno + export DENO_BIN_PATH=$QUARTO_BIN_PATH/tools/$DENO_ARCH_DIR/deno else if [ -z "$DENO_BIN_PATH" ]; then echo "DENO_BIN_PATH is not set. You either need to allow QUARTO_VENDOR_BINARIES or set DENO_BIN_PATH to the path of a deno binary." @@ -74,6 +75,12 @@ else fi fi +if [ "$QUARTO_DENO_DIR" == "" ]; then + export DENO_DIR=$QUARTO_BIN_PATH/deno_cache +else + export DENO_DIR=$QUARTO_DENO_DIR +fi + echo "Downloading Deno Stdlib" "${QUARTO_PACKAGE_PATH}/scripts/deno_std/download.sh" @@ -82,6 +89,11 @@ pushd "$QUARTO_PACKAGE_PATH/src/" # Run the configure command to bootstrap installation ./quarto-bld configure --log-level info +popd + +# download typescript dependencies +source package/scripts/vendoring/vendor.sh + # Run the quarto command with 'reload', which will force the import_map dependencies # to be reloaded if ! quarto_loc="$(type -p quarto)" || [[ -z $quarto_loc ]]; then diff --git a/dev-docs/add-typescript-dependency.md b/dev-docs/add-typescript-dependency.md index 679164c5e06..fa6eb60a017 100644 --- a/dev-docs/add-typescript-dependency.md +++ b/dev-docs/add-typescript-dependency.md @@ -10,4 +10,4 @@ We vendor all external dependencies to avoid downloads during the execution of q - If the dependency is meant to be exposed to quarto typescript script (through `quarto run`), then add the import to `package/scripts/deno_std/deno_std.ts` as well (notice the slightly different syntax there, and adapt accordingly). -Then, run the `./package/scripts/vendoring/vendor.sh` scripts to update the vendored dependencies. This script will update `src/dev_import_map.json`, as well as files in `src/vendor`, `src/resources/deno_std`, and `src/resources/vendor`. Check those changes in version control. +Then, rerun `./configure.sh`, which calls the `./package/scripts/vendoring/vendor.sh` scripts to update the deno cache with the downloaded dependencies. \ No newline at end of file diff --git a/dev-docs/upgrade-dependencies.md b/dev-docs/upgrade-dependencies.md index 3433492a903..fe52814715d 100644 --- a/dev-docs/upgrade-dependencies.md +++ b/dev-docs/upgrade-dependencies.md @@ -10,7 +10,7 @@ Contact Carlos so he uploads the binaries to the S3 bucket. - In `src/import_map.json`, change the version number of the imports like `https://deno.land/std@0.204.0/archive` to the new version number (e.g. `0.205.0`). -- run `./package/scripts/vendoring/vendor.sh` +- run `./configure.sh`. ### Upgrade Deno download link for RHEL build from conda-forge diff --git a/package/scripts/common/quarto b/package/scripts/common/quarto index 939bdd3d3eb..485e1406b52 100755 --- a/package/scripts/common/quarto +++ b/package/scripts/common/quarto @@ -33,6 +33,8 @@ else fi QUARTO_SRC_PATH="$QUARTO_ROOT/src" DEV_PATH=$QUARTO_SRC_PATH/quarto.ts +QUARTO_IMPORT_MAP_ARG=--importmap=$QUARTO_SRC_PATH/import_map.json + if [ -f "$DEV_PATH" ]; then if [ "$1" == "--version" ] || [ "$1" == "-v" ]; then if [ "$QUARTO_FORCE_VERSION" != "" ]; then @@ -48,9 +50,6 @@ if [ -f "$DEV_PATH" ]; then QUARTO_ACTION=run fi - # Local import map - QUARTO_IMPORT_MAP_ARG=--importmap=$QUARTO_SRC_PATH/import_map.json - # Turn on type checking for dev version if [ -z ${QUARTO_NO_TYPECHECK+x} ]; then QUARTO_DENO_OPTIONS=--check @@ -63,10 +62,12 @@ if [ -f "$DEV_PATH" ]; then export QUARTO_BIN_PATH=$SCRIPT_PATH export QUARTO_SHARE_PATH="${QUARTO_SHARE_PATH=$QUARTO_SRC_PATH/resources/}" + export DENO_DIR=$QUARTO_BIN_PATH/deno_cache + if [ -z ${QUARTO_DEBUG+x} ]; then export QUARTO_DEBUG=true fi - # QUARTO_CACHE_OPTIONS="--cached-only" + QUARTO_CACHE_OPTIONS="--cached-only" # Check for deno update QUARTO_DIST_CONFIG=$QUARTO_BIN_PATH/../config @@ -91,7 +92,8 @@ else QUARTO_ACTION=run QUARTO_TARGET=${SCRIPT_PATH}/quarto.js export QUARTO_BIN_PATH=$SCRIPT_PATH - QUARTO_CACHE_OPTIONS="" + export DENO_DIR=$QUARTO_BIN_PATH/deno_cache + QUARTO_CACHE_OPTIONS="--cached-only" # Turn off type checking for bundled version QUARTO_DENO_OPTIONS=--no-check @@ -108,9 +110,6 @@ else fi fi - # release vendored import map - QUARTO_IMPORT_MAP_ARG=--importmap=$SCRIPT_PATH/vendor/import_map.json - if [ "$1" == "--version" ] || [ "$1" == "-v" ]; then if [ "$QUARTO_FORCE_VERSION" != "" ]; then echo $QUARTO_FORCE_VERSION diff --git a/package/scripts/common/utils.sh b/package/scripts/common/utils.sh index f8b73ac08b8..1b640b9f785 100644 --- a/package/scripts/common/utils.sh +++ b/package/scripts/common/utils.sh @@ -1,4 +1,4 @@ -# DENOFILES is only required at configure.sh, but DENO_DIR is used in many places +# DENOFILES is only required at configure.sh, but DENO_ARCH_DIR is used in many places if [[ $OSTYPE == 'darwin'* ]]; then DENOURL=https://github.com/denoland/deno/releases/download @@ -6,10 +6,10 @@ if [[ $OSTYPE == 'darwin'* ]]; then if [[ $FULLARCH == "Darwin x86_64" ]]; then - DENO_DIR=x86_64 + DENO_ARCH_DIR=x86_64 DENOFILES="deno-x86_64-apple-darwin.zip" elif [[ $FULLARCH == "Darwin arm64" ]]; then - DENO_DIR=aarch64 + DENO_ARCH_DIR=aarch64 DENOFILES="deno-aarch64-apple-darwin.zip" else echo "configure script failed: unrecognized architecture " ${FULLARCH} @@ -21,11 +21,11 @@ else if [[ $NIXARCH == "x86_64" ]]; then DENOURL=https://github.com/denoland/deno/releases/download DENOFILES=deno-x86_64-unknown-linux-gnu.zip - DENO_DIR=x86_64 + DENO_ARCH_DIR=x86_64 elif [[ $NIXARCH == "aarch64" ]]; then DENOURL=https://github.com/denoland/deno/releases/download DENOFILES=deno-aarch64-unknown-linux-gnu.zip - DENO_DIR=aarch64 + DENO_ARCH_DIR=aarch64 else echo "configure script failed: unrecognized architecture " ${NIXARCH} exit 1 diff --git a/package/scripts/deno_std/download.bat b/package/scripts/deno_std/download.bat index b7e3b504be1..ab56f1bb36a 100644 --- a/package/scripts/deno_std/download.bat +++ b/package/scripts/deno_std/download.bat @@ -6,4 +6,4 @@ if NOT DEFINED QUARTO_DENO ( ) set DENO_DIR=%~dp0\..\..\..\src\resources\deno_std\cache -%QUARTO_DENO% cache --unstable-ffi --lock %~dp0\..\..\..\src\resources\deno_std\deno_std.lock %~dp0\deno_std.ts +%QUARTO_DENO% cache --allow-import --unstable-ffi --lock %~dp0\..\..\..\src\resources\deno_std\deno_std.lock %~dp0\deno_std.ts diff --git a/package/scripts/deno_std/download.sh b/package/scripts/deno_std/download.sh index d815099435d..80c965b9c10 100755 --- a/package/scripts/deno_std/download.sh +++ b/package/scripts/deno_std/download.sh @@ -5,7 +5,7 @@ source "$SCRIPT_PATH/../../../configuration" source "$SCRIPT_PATH/../../src/set_package_paths.sh" if [ -z "$QUARTO_DENO" ]; then - export QUARTO_DENO="$QUARTO_DIST_PATH/bin/tools/$DENO_DIR/deno" + export QUARTO_DENO="$QUARTO_DIST_PATH/bin/tools/$DENO_ARCH_DIR/deno" fi diff --git a/package/scripts/vendoring/vendor.cmd b/package/scripts/vendoring/vendor.cmd new file mode 100644 index 00000000000..a94f21c3d9c --- /dev/null +++ b/package/scripts/vendoring/vendor.cmd @@ -0,0 +1,36 @@ +@ECHO OFF +REM You should not need to run this script directly. +REM It is sourced by the configure.cmd script. +SETLOCAL ENABLEDELAYEDEXPANSION + +IF "%QUARTO_VENDOR_BINARIES%"=="true" ( + SET DENO_BIN_PATH=!QUARTO_BIN_PATH!\tools\!DENO_ARCH_DIR!\deno.exe +) ELSE ( + IF NOT DEFINED DENO_BIN_PATH ( + ECHO DENO_BIN_PATH is not set. You either need to allow QUARTO_VENDOR_BINARIES or set DENO_BIN_PATH to the path of a deno binary. + EXIT /B 1 + ) +) + +IF NOT DEFINED DENO_DIR ( + SET DENO_DIR=!QUARTO_BIN_PATH!\deno_cache +) + +ECHO Revendoring quarto dependencies + +REM remove deno_cache directory first +IF EXIST "!DENO_DIR!" ( + RMDIR /S /Q "!DENO_DIR!" +) + +PUSHD "!QUARTO_SRC_PATH!" + +FOR %%E IN (quarto.ts vendor_deps.ts ..\tests\test-deps.ts ..\package\scripts\deno_std\deno_std.ts) DO ( + CALL !DENO_BIN_PATH! install --allow-all --no-config --entrypoint %%E --importmap="!QUARTO_SRC_PATH!\import_map.json" +) + +REM Return to the original directory +POPD + + +EXIT /B 0 \ No newline at end of file diff --git a/package/scripts/vendoring/vendor.sh b/package/scripts/vendoring/vendor.sh index 464176ea5fa..04d899a51ed 100755 --- a/package/scripts/vendoring/vendor.sh +++ b/package/scripts/vendoring/vendor.sh @@ -1,26 +1,7 @@ -#!/usr/bin/env bash - -source configuration - -# Defaults are set in configuration file, but can be overridden here. -# We can't put these overrides in the configuration file because it is parsed -# very naively on windows. -export DENO=${DENO_VERSION=$DENO} -export DENO_DOM=${DENO_DOM_VERSION=$DENO_DOM} -export PANDOC=${PANDOC_VERSION=$PANDOC} -export DARTSASS=${DART_SASS_VERSION=$DARTSASS} -export ESBUILD=${ESBUILD_VERSION=$ESBUILD} -export TYPST=${TYPST_VERSION=$TYPST} - -source package/scripts/common/utils.sh -source package/src/set_package_paths.sh - -QUARTO_VENDOR_BINARIES=${QUARTO_VENDOR_BINARIES=true} - -DENO_BIN=${QUARTO_DENO=$QUARTO_BIN_PATH/tools/$DENO_DIR/deno} - +# You should not need to run this script directly. +# It is sourced by the configure.sh script. if [[ "${QUARTO_VENDOR_BINARIES}" = "true" ]]; then - export DENO_BIN_PATH=$QUARTO_BIN_PATH/tools/$DENO_DIR/deno + export DENO_BIN_PATH=$QUARTO_BIN_PATH/tools/$DENO_ARCH_DIR/deno else if [ -z "$DENO_BIN_PATH" ]; then echo "DENO_BIN_PATH is not set. You either need to allow QUARTO_VENDOR_BINARIES or set DENO_BIN_PATH to the path of a deno binary." @@ -28,23 +9,21 @@ else fi fi +if [ -z "$DENO_DIR" ]; then + export DENO_DIR=$QUARTO_BIN_PATH/deno_cache +fi + echo Revendoring quarto dependencies -pushd ${QUARTO_SRC_PATH} -today=`date +%Y-%m-%d` -mv vendor vendor-${today} +# remove deno_cache directory first +if [ -d "$DENO_DIR" ]; then + rm -rf "$DENO_DIR" +fi + +pushd "${QUARTO_SRC_PATH}" set +e -$DENO_BIN_PATH vendor --no-config quarto.ts $QUARTO_ROOT/src/vendor_deps.ts $QUARTO_ROOT/tests/test-deps.ts $QUARTO_ROOT/package/scripts/deno_std/deno_std.ts --importmap=$QUARTO_SRC_PATH/import_map.json -return_code="$?" +for entrypoint in quarto.ts vendor_deps.ts ../tests/test-deps.ts ../package/scripts/deno_std/deno_std.ts; do + $DENO_BIN_PATH install --allow-all --no-config --entrypoint $entrypoint "--importmap=$QUARTO_SRC_PATH/import_map.json" +done set -e -if [[ ${return_code} -ne 0 ]]; then - echo "deno vendor failed (likely because of a download error). Please run the configure script again." - rm -rf vendor - mv vendor-${today} vendor - exit 1 -else - rm -rf vendor-${today} -fi -$DENO_BIN_PATH run --no-config --unstable-ffi --allow-all --importmap=$QUARTO_SRC_PATH/import_map.json $QUARTO_PACKAGE_PATH/src/common/create-dev-import-map.ts popd -source configure.sh \ No newline at end of file diff --git a/package/src/bld.ts b/package/src/bld.ts index 3e70da82dba..7bdbc86861f 100644 --- a/package/src/bld.ts +++ b/package/src/bld.ts @@ -61,57 +61,47 @@ function getCommands() { // deno-lint-ignore no-explicit-any const commands: Command[] = []; commands.push( - packageCommand(configure) - .name("configure") + packageCommand(configure, "configure") .description( "Configures this machine for running developer version of Quarto", ), ); commands.push( - packageCommand(updateHtmlDependencies) - .name("update-html-dependencies") + packageCommand(updateHtmlDependencies, "update-html-dependencies") .description( "Updates Bootstrap, themes, and JS/CSS dependencies based upon the version in configuration", ), ); commands.push( - packageCommand(archiveBinaryDependencies) - .name("archive-bin-deps") + packageCommand(archiveBinaryDependencies, "archive-bin-deps") .description("Downloads and archives our binary dependencies."), ); commands.push( - packageCommand(checkBinaryDependencies) - .name("check-bin-deps") + packageCommand(checkBinaryDependencies, "check-bin-deps") .description("Checks the paths and URLs of our binary dependencies."), ); commands.push( - packageCommand(prepareDist) - .name("prepare-dist") + packageCommand(prepareDist, "prepare-dist") .description("Prepares the distribution directory for packaging."), ); commands.push( - packageCommand(validateBundle) - .name("validate-bundle") + packageCommand(validateBundle, "validate-bundle") .description("Validate a JS bundle built using prepare-dist") ); commands.push( - packageCommand(makeInstallerMac) - .name("make-installer-mac") + packageCommand(makeInstallerMac, "make-installer-mac") .description("Builds Mac OS installer"), ); commands.push( - packageCommand(makeInstallerDeb) - .name("make-installer-deb") + packageCommand(makeInstallerDeb, "make-installer-deb") .description("Builds Linux deb installer"), ); commands.push( - packageCommand(makeInstallerWindows) - .name("make-installer-win") + packageCommand(makeInstallerWindows, "make-installer-win") .description("Builds Windows installer"), ); commands.push( - packageCommand(makeInstallerExternal) - .name("make-installer-dir") + packageCommand(makeInstallerExternal, "make-installer-dir") .description("Copies Quarto-only files, omitting dependencies, to specified location (for use in third party packaging)"), ); commands.push( diff --git a/package/src/cmd/pkg-cmd.ts b/package/src/cmd/pkg-cmd.ts index 954eddd5a58..47911281732 100644 --- a/package/src/cmd/pkg-cmd.ts +++ b/package/src/cmd/pkg-cmd.ts @@ -7,6 +7,8 @@ import { Command } from "cliffy/command/mod.ts"; import { join } from "../../../src/deno_ral/path.ts"; +import { group } from "../../../src/tools/github.ts"; + import { configurationAST, printConfiguration } from "../common/config.ts"; import { @@ -20,7 +22,7 @@ import { logPandocJson } from "../../../src/core/log.ts"; export const kLogLevel = "logLevel"; export const kVersion = "setVersion"; -export function packageCommand(run: (config: Configuration) => Promise) { +export function packageCommand(run: (config: Configuration) => Promise, commandName: string) { return new Command().option( "-sv, --set-version [version:string]", "Version to set when preparing this distribution", @@ -50,13 +52,17 @@ export function packageCommand(run: (config: Configuration) => Promise) { Deno.env.set("QUARTO_DEBUG", "true"); // Print the configuration - try { - await logPandocJson(configurationAST(config)); - } catch (e) { - printConfiguration(config); - } - - // Run the command - await run(config); - }); + await group("Configuration info", async () => { + try { + await logPandocJson(configurationAST(config)); + } catch (e) { + printConfiguration(config); + } + }); + + await group(commandName, async () => { + // Run the command + await run(config); + }); + }).name(commandName); } diff --git a/package/src/common/config.ts b/package/src/common/config.ts index d8f02c5d117..06aa4b63bd0 100644 --- a/package/src/common/config.ts +++ b/package/src/common/config.ts @@ -152,10 +152,11 @@ export function printConfiguration(config: Configuration) { info(""); info("******************************************"); info("Configuration:"); - info(` - OS: ${config.os}`); - info(` - Arch: ${config.arch}`); - info(` - Version: ${config.version}`); - info(` - Cwd: ${Deno.cwd()}`); + info(` - OS: ${config.os}`); + info(` - Arch: ${config.arch}`); + info(` - Version: ${config.version}`); + info(` - Cwd: ${Deno.cwd()}`); + info(` - DENO_DIR: ${Deno.env.get("DENO_DIR")}`); info(` - Directory configuration:`); info( ` - Package folder (build source): ${config.directoryInfo.pkg}`, diff --git a/package/src/common/prepare-dist.ts b/package/src/common/prepare-dist.ts index bcc43dfb959..88729e6c4fd 100755 --- a/package/src/common/prepare-dist.ts +++ b/package/src/common/prepare-dist.ts @@ -171,9 +171,7 @@ export async function prepareDist( const configDir = join(config.directoryInfo.dist, "config"); info(configDir); if (existsSync(configDir)) { - Deno.removeSync(configDir, { - recursive: true, - }); + Deno.removeSync(configDir, { recursive: true }); } info(""); @@ -194,10 +192,6 @@ function supportingFiles(config: Configuration) { from: join(config.directoryInfo.src, "resources"), to: config.directoryInfo.pkgWorking.share, }, - { - from: join(config.directoryInfo.src, "resources", "vendor"), - to: join(config.directoryInfo.pkgWorking.bin, "vendor"), - }, ]; // Gather supporting files @@ -214,7 +208,6 @@ function supportingFiles(config: Configuration) { // compiled later const pathsToClean = [ join(config.directoryInfo.pkgWorking.share, "filters"), - join(config.directoryInfo.pkgWorking.share, "vendor"), ]; pathsToClean.forEach((path) => Deno.removeSync(path, { recursive: true })); } diff --git a/package/src/quarto-bld b/package/src/quarto-bld index 529d531a8a4..6aaf5cd47a4 100755 --- a/package/src/quarto-bld +++ b/package/src/quarto-bld @@ -9,7 +9,7 @@ source "${SCRIPT_PATH}/../../configuration" source "${SCRIPT_PATH}/set_package_paths.sh" if [ -z "$QUARTO_DENO" ]; then - export QUARTO_DENO=$SCRIPT_PATH/../dist/bin/tools/$DENO_DIR/deno + export QUARTO_DENO=$SCRIPT_PATH/../dist/bin/tools/$DENO_ARCH_DIR/deno fi export RUST_BACKTRACE=full diff --git a/package/src/quarto-bld.cmd b/package/src/quarto-bld.cmd index 81a9dda52e9..f514e9f6214 100644 --- a/package/src/quarto-bld.cmd +++ b/package/src/quarto-bld.cmd @@ -9,4 +9,4 @@ if NOT DEFINED QUARTO_DENO ( SET "RUST_BACKTRACE=full" SET "DENO_NO_UPDATE_CHECK=1" -"%QUARTO_DENO%" run --unstable-kv --unstable-ffi --allow-all --importmap=%~dp0\..\..\src\dev_import_map.json %~dp0\bld.ts %* +"%QUARTO_DENO%" run --unstable-kv --unstable-ffi --allow-all --importmap=%~dp0\..\..\src\import_map.json %~dp0\bld.ts %* diff --git a/src/command/check/check.ts b/src/command/check/check.ts index 2b1cfd20bb2..16668234540 100644 --- a/src/command/check/check.ts +++ b/src/command/check/check.ts @@ -261,7 +261,7 @@ async function checkVersions(conf: CheckConfiguration) { : [ [pandocVersion, ">=2.19.2", "Pandoc"], [sassVersion, ">=1.32.8", "Dart Sass"], - [denoVersion, ">=1.33.1", "Deno"], + [denoVersion, ">=2.2.10", "Deno"], [typstVersion, ">=0.10.0", "Typst"], ]; const fun = strict ? strictCheckVersion : checkVersion; diff --git a/src/command/render/pandoc.ts b/src/command/render/pandoc.ts index b47fa12ff2d..4d52ca228f4 100644 --- a/src/command/render/pandoc.ts +++ b/src/command/render/pandoc.ts @@ -196,7 +196,7 @@ import { createMarkdownPipeline, MarkdownPipelineHandler, } from "../../core/markdown-pipeline.ts"; -import { getEnv } from "../../../package/src/util/utils.ts"; +import { getenv } from "../../core/env.ts"; import { BrandFontBunny, BrandFontFile, @@ -351,7 +351,7 @@ export async function runPandoc( // load the system lua libraries, which may not be compatible with // the lua version we are using if (Deno.env.get("QUARTO_LUA_CPATH") !== undefined) { - pandocEnv["LUA_CPATH"] = getEnv("QUARTO_LUA_CPATH"); + pandocEnv["LUA_CPATH"] = getenv("QUARTO_LUA_CPATH"); } else { pandocEnv["LUA_CPATH"] = ""; } diff --git a/src/core/deno/debug.ts b/src/core/deno/debug.ts index 01a94641175..1c910df059a 100644 --- a/src/core/deno/debug.ts +++ b/src/core/deno/debug.ts @@ -6,7 +6,7 @@ * Debugging utilities. */ -import * as colors from "colors"; +import * as colors from "fmt/colors"; type StackEntry = { pos: string; diff --git a/src/core/devconfig.ts b/src/core/devconfig.ts index 820bf55f0c6..7f2d3cbe0f1 100644 --- a/src/core/devconfig.ts +++ b/src/core/devconfig.ts @@ -24,8 +24,7 @@ export interface DevConfig { esbuild: string; typst: string; script: string; - importMap: string; // import map for most imports, which we need on dev version - bundleImportMap: string; // import map for dynamic imports which we need on bundled versions + importMap: string; } export function createDevConfig( @@ -53,11 +52,6 @@ export function createDevConfig( join(srcDir, "import_map.json"), ), ), - bundleImportMap: md5HashSync( - Deno.readTextFileSync( - join(srcDir, "resources/vendor/import_map.json"), - ), - ), }; } @@ -117,8 +111,7 @@ export function devConfigsEqual(a: DevConfig, b: DevConfig) { a.esbuild == b.esbuild && a.typst === b.typst && a.script == b.script && - a.importMap === b.importMap && - a.bundleImportMap === b.bundleImportMap; + a.importMap === b.importMap; } export async function reconfigureQuarto( @@ -183,8 +176,7 @@ function reconfigureReason( } else if (installed.script !== source.script) { return "update Quarto wrapper script"; } else if ( - installed.importMap !== source.importMap || - installed.bundleImportMap !== source.importMap + installed.importMap !== source.importMap ) { return "update dev import map"; } diff --git a/src/core/jupyter/jupyter.ts b/src/core/jupyter/jupyter.ts index a3e5923f794..e7bfaa77779 100644 --- a/src/core/jupyter/jupyter.ts +++ b/src/core/jupyter/jupyter.ts @@ -1837,7 +1837,7 @@ async function mdOutputStream( ); } else { // normal default behavior - return mdCodeOutput(text.map(colors.stripColor)); + return mdCodeOutput(text.map(colors.stripAnsiCode)); } } @@ -1946,7 +1946,7 @@ which does not appear to be plain text: ${JSON.stringify(data)}`, return mdCodeOutput(lines); } } else { - return mdCodeOutput(lines.map(colors.stripColor)); + return mdCodeOutput(lines.map(colors.stripAnsiCode)); } } } @@ -1991,7 +1991,7 @@ function mdImageOutput( // get the data const imageText = Array.isArray(data) ? (data as string[]).join("") - : data as string; + : (data as string).trim(); const outputFile = join(options.assets.base_dir, imageFile); if ( @@ -2002,7 +2002,9 @@ function mdImageOutput( // https://github.com/quarto-dev/quarto-cli/issues/9793 !/> => { if (forceReload || !dotenvConfig) { + const defaultOptions: ConfigOptions = { + envPath: join(quartoConfig.sharePath(), "env", "env.defaults"), + }; + dotenvConfig = await config(defaultOptions); const options: ConfigOptions = { - defaultsPath: join(quartoConfig.sharePath(), "env", "env.defaults"), - // On dev mode only (QUARTO_DEBUG='true'), we load the .env file in root quarto-cli project envPath: quartoConfig.isDebug() ? join(quartoConfig.sharePath(), "..", "..", ".env") : null, - // we don't want any `.env.example` o be loaded, especially one from working dir - // https://github.com/quarto-dev/quarto-cli/issues/9262 - examplePath: null, }; - dotenvConfig = await config(options); + const otherConfig = await config(options); + for (const key of Object.keys(otherConfig)) { + dotenvConfig[key] = otherConfig[key]; + } } return dotenvConfig; }, diff --git a/src/deno_ral/path.ts b/src/deno_ral/path.ts index 7cf51ad93fa..994c0b4071d 100644 --- a/src/deno_ral/path.ts +++ b/src/deno_ral/path.ts @@ -5,6 +5,7 @@ */ import * as path from "path"; +import { normalize as posixNormalize } from "path/posix"; export const SEP = path.SEPARATOR; export const SEP_PATTERN = path.SEPARATOR_PATTERN; @@ -21,4 +22,4 @@ export const normalize = path.normalize; export const toFileUrl = path.toFileUrl; export const isGlob = path.isGlob; -export const posix = { normalize: path.posix.normalize }; +export const posix = { normalize: posixNormalize }; diff --git a/src/deno_ral/tar.ts b/src/deno_ral/tar.ts new file mode 100644 index 00000000000..f9065c3a445 --- /dev/null +++ b/src/deno_ral/tar.ts @@ -0,0 +1,48 @@ +/* + * tar.ts + * + * Copyright (C) 2025 Posit Software, PBC + * + * Abstraction layer over Deno's `tar` utilities. + */ + +import { TarStream, type TarStreamInput } from "jsr:@std/tar/tar-stream"; + +/** + * Creates a tar archive from the specified files and directories. + * @param outputPath The path where the tar archive will be created. + * @param filePaths An array of file and directory paths to include in the tar archive. Paths are relative to outputPath. + * @returns A promise that resolves when the tar archive is created. + */ +export async function createTarFromFiles( + outputPath: string, + filePaths: string[], +) { + // Create array of TarStreamInput objects from file paths + const inputs: TarStreamInput[] = await Promise.all( + filePaths.map(async (path) => { + const stat = await Deno.stat(path); + + if (stat.isDirectory) { + // Handle directory + return { + type: "directory", + path: path + (path.endsWith("/") ? "" : "/"), + }; + } else { + // Handle file + return { + type: "file", + path: path, + size: stat.size, + readable: (await Deno.open(path)).readable, + }; + } + }), + ); + + // Create tar file using streaming API + await ReadableStream.from(inputs) + .pipeThrough(new TarStream()) + .pipeTo((await Deno.create(outputPath)).writable); +} diff --git a/src/import_map.json b/src/import_map.json index edc1a146eef..c1c370a7409 100644 --- a/src/import_map.json +++ b/src/import_map.json @@ -1,32 +1,32 @@ { "imports": { - "archive/": "jsr:/@std/archive@^0.225.0/", - "async": "jsr:/@std/async@^0.224.0", - "async/": "jsr:/@std/async@^0.224.0/", - "bytes/": "jsr:/@std/bytes@^0.224.0/", - "collection/": "jsr:/@std/collection@^0.224.0/", - "colors": "https://deno.land/std@0.217.0/fmt/colors.ts", - "crypto/": "jsr:/@std/crypto@^0.224.0/", - "datetime/": "jsr:/@std/datetime@^0.224.0/", - "dotenv": "jsr:/@std/dotenv@^0.224.0", - "dotenv/": "jsr:/@std/dotenv@^0.224.0/", - "encoding/": "jsr:/@std/encoding@^0.224.0/", + "async": "jsr:/@std/async@1.0.12", + "bytes/": "jsr:/@std/bytes@1.0.5/", + "crypto/": "jsr:/@std/crypto@1.0.4/", + "encoding/": "jsr:/@std/encoding@1.0.9/", + "fmt/": "jsr:/@std/fmt@1.0.6/", + "fs/": "jsr:/@std/fs@1.0.16/", + "http/": "jsr:/@std/http@1.0.14/", + "path": "jsr:@std/path@1.0.8", + "path/posix": "jsr:@std/path@1.0.8/posix", + "streams/": "jsr:/@std/streams@1.0.9/", + "tar": "jsr:/@std/tar@0.1.6", + "tar/": "jsr:/@std/tar@0.1.6/", + "uuid/": "jsr:/@std/uuid@1.0.6/", + "https://deno.land/std@0.91.0/path/mod.ts": "jsr:/@std/path@1.0.8", + "https://deno.land/std@0.91.0/path/": "jsr:/@std/path@1.0.8/", + + "testing/": "jsr:/@std/testing@0.224.0/", + "flags": "jsr:/@std/flags@0.224.0", + "datetime/": "jsr:/@std/datetime@0.225.4/", + "dotenv": "jsr:/@std/dotenv@0.225.3", + "dotenv/": "jsr:/@std/dotenv@0.225.3/", + "io": "jsr:/@std/io@0.224.0", + "io/": "jsr:/@std/io@0.224.0/", + "log": "jsr:/@std/log@0.224.0", + "log/": "jsr:/@std/log@0.224.0/", + "yaml": "https://cdn.skypack.dev/js-yaml", - "flags": "jsr:/@std/flags@^0.224.0", - "fmt/": "jsr:/@std/fmt@^0.224.0/", - "fs/": "jsr:/@std/fs@^0.224.0/", - "http/": "jsr:/@std/http@^0.224.0/", - "io/": "jsr:/@std/io@^0.224.0/", - "log": "jsr:/@std/log@^0.224.0", - "log/": "jsr:/@std/log@^0.224.0/", - "node/": "jsr:/@std/node@^0.224.0/", - "path": "jsr:@std/path@^0.224.0", - "permissions/": "jsr:/@std/permissions@^0.224.0/", - "signal/": "jsr:/@std/signal@^0.224.0/", - "streams/": "jsr:/@std/streams@^0.224.0/", - "testing/": "jsr:/@std/testing@^0.224.0/", - "uuid/": "jsr:/@std/uuid@^0.224.0/", - "wasi/": "jsr:/@std/wasi@^0.224.0/", "events/": "https://deno.land/x/events@v1.0.0/", "cache/": "https://deno.land/x/cache@0.2.12/", "cliffy/": "https://deno.land/x/cliffy@v1.0.0-rc.3/", @@ -53,6 +53,8 @@ "fontoxpath": "https://cdn.skypack.dev/fontoxpath@3.29.1", "scss-parser": "https://cdn.skypack.dev/scss-parser@1.0.6", + "puppeteer": "https://deno.land/x/puppeteer@9.0.2/mod.ts", + "https://deno.land/std@0.196.0/console/unicode_width.ts": "https://deno.land/std@0.224.0/console/unicode_width.ts", "https://deno.land/std@0.161.0/": "https://deno.land/std@0.217.0/", "https://deno.land/std@0.101.0/": "https://deno.land/std@0.217.0/", @@ -61,87 +63,7 @@ "https://deno.land/std@0.93.0/path/mod.ts": "https://deno.land/std@0.204.0/path/mod.ts", "https://deno.land/std@0.93.0/": "https://deno.land/std@0.217.0/", - "https://deno.land/std@0.91.0/path/mod.ts": "jsr:/@std/path@^0.224.0", - "https://deno.land/std@0.91.0/path/": "jsr:/@std/path@^0.224.0/", "https://deno.land/std@0.91.0/fs/exists.ts": "https://deno.land/std@0.217.0/fs/exists.ts", - "https://deno.land/std@0.91.0/fs/ensure_dir.ts": "https://deno.land/std@0.217.0/fs/ensure_dir.ts", - - "https://deno.land/std@0.91.0/hash/": "./resources/vendor/deno-land/std@0-91-0/hash/", - "https://deno.land/x/cache@0.2.12/": "./resources/vendor/deno-land/x/cache@0-2-12/", - "https://dev.jspm.io/": "./resources/vendor/dev-jspm-io/", - "https://dev.jspm.io/jszip@3.5.0": "./resources/vendor/dev-jspm-io/jszip@3.5.0.js", - "puppeteer/": "./resources/vendor/deno-land/x/puppeteer@9-0-2/" - }, - "scopes": { - "./resources/vendor/dev-jspm-io/": { - "/npm:@jspm/core@1.1.1/nodelibs/buffer.js": "./resources/vendor/dev-jspm-io/npm_@jspm/core@1-1-1/nodelibs/buffer.js", - "/npm:@jspm/core@1.1.1/nodelibs/chunk-0c2d1322.js": "./resources/vendor/dev-jspm-io/npm_@jspm/core@1-1-1/nodelibs/chunk-0c2d1322.js", - "/npm:@jspm/core@1.1.1/nodelibs/chunk-6e68c801.js": "./resources/vendor/dev-jspm-io/npm_@jspm/core@1-1-1/nodelibs/chunk-6e68c801.js", - "/npm:@jspm/core@1.1.1/nodelibs/chunk-cffba9d4.js": "./resources/vendor/dev-jspm-io/npm_@jspm/core@1-1-1/nodelibs/chunk-cffba9d4.js", - "/npm:@jspm/core@1.1.1/nodelibs/chunk-dac557ba.js": "./resources/vendor/dev-jspm-io/npm_@jspm/core@1-1-1/nodelibs/chunk-dac557ba.js", - "/npm:@jspm/core@1.1.1/nodelibs/events.js": "./resources/vendor/dev-jspm-io/npm_@jspm/core@1-1-1/nodelibs/events.js", - "/npm:@jspm/core@1.1.1/nodelibs/stream.js": "./resources/vendor/dev-jspm-io/npm_@jspm/core@1-1-1/nodelibs/stream.js", - "/npm:@jspm/core@1.1.1/nodelibs/util.js": "./resources/vendor/dev-jspm-io/npm_@jspm/core@1-1-1/nodelibs/util.js", - "/npm:@jspm/core@1/nodelibs/buffer.js": "./resources/vendor/dev-jspm-io/npm_@jspm/core@1/nodelibs/buffer.js", - "/npm:@jspm/core@1/nodelibs/stream.js": "./resources/vendor/dev-jspm-io/npm_@jspm/core@1/nodelibs/stream.js", - "/npm:immediate@3.0.6/lib/browser.dew.js": "./resources/vendor/dev-jspm-io/npm_immediate@3-0-6/lib/browser.dew.js", - "/npm:immediate@3.0?dew": "./resources/vendor/dev-jspm-io/npm_immediate@3.0.js", - "/npm:jszip@3.5.0/lib/base64.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/base64.dew.js", - "/npm:jszip@3.5.0/lib/compressedObject.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/compressedObject.dew.js", - "/npm:jszip@3.5.0/lib/compressions.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/compressions.dew.js", - "/npm:jszip@3.5.0/lib/crc32.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/crc32.dew.js", - "/npm:jszip@3.5.0/lib/defaults.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/defaults.dew.js", - "/npm:jszip@3.5.0/lib/external.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/external.dew.js", - "/npm:jszip@3.5.0/lib/flate.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/flate.dew.js", - "/npm:jszip@3.5.0/lib/generate/ZipFileWorker.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/generate/ZipFileWorker.dew.js", - "/npm:jszip@3.5.0/lib/generate/index.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/generate/index.dew.js", - "/npm:jszip@3.5.0/lib/index.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/index.dew.js", - "/npm:jszip@3.5.0/lib/load.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/load.dew.js", - "/npm:jszip@3.5.0/lib/nodejs/NodejsStreamInputAdapter.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/nodejs/NodejsStreamInputAdapter.dew.js", - "/npm:jszip@3.5.0/lib/nodejs/NodejsStreamOutputAdapter.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/nodejs/NodejsStreamOutputAdapter.dew.js", - "/npm:jszip@3.5.0/lib/nodejsUtils.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/nodejsUtils.dew.js", - "/npm:jszip@3.5.0/lib/object.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/object.dew.js", - "/npm:jszip@3.5.0/lib/readable-stream-browser.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/readable-stream-browser.dew.js", - "/npm:jszip@3.5.0/lib/reader/ArrayReader.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/reader/ArrayReader.dew.js", - "/npm:jszip@3.5.0/lib/reader/DataReader.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/reader/DataReader.dew.js", - "/npm:jszip@3.5.0/lib/reader/NodeBufferReader.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/reader/NodeBufferReader.dew.js", - "/npm:jszip@3.5.0/lib/reader/StringReader.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/reader/StringReader.dew.js", - "/npm:jszip@3.5.0/lib/reader/Uint8ArrayReader.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/reader/Uint8ArrayReader.dew.js", - "/npm:jszip@3.5.0/lib/reader/readerFor.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/reader/readerFor.dew.js", - "/npm:jszip@3.5.0/lib/signature.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/signature.dew.js", - "/npm:jszip@3.5.0/lib/stream/ConvertWorker.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/stream/ConvertWorker.dew.js", - "/npm:jszip@3.5.0/lib/stream/Crc32Probe.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/stream/Crc32Probe.dew.js", - "/npm:jszip@3.5.0/lib/stream/DataLengthProbe.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/stream/DataLengthProbe.dew.js", - "/npm:jszip@3.5.0/lib/stream/DataWorker.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/stream/DataWorker.dew.js", - "/npm:jszip@3.5.0/lib/stream/GenericWorker.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/stream/GenericWorker.dew.js", - "/npm:jszip@3.5.0/lib/stream/StreamHelper.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/stream/StreamHelper.dew.js", - "/npm:jszip@3.5.0/lib/support.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/support.dew.js", - "/npm:jszip@3.5.0/lib/utf8.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/utf8.dew.js", - "/npm:jszip@3.5.0/lib/utils.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/utils.dew.js", - "/npm:jszip@3.5.0/lib/zipEntries.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/zipEntries.dew.js", - "/npm:jszip@3.5.0/lib/zipEntry.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/zipEntry.dew.js", - "/npm:jszip@3.5.0/lib/zipObject.dew.js": "./resources/vendor/dev-jspm-io/npm_jszip@3-5-0/lib/zipObject.dew.js", - "/npm:lie@3.3.0/lib/browser.dew.js": "./resources/vendor/dev-jspm-io/npm_lie@3-3-0/lib/browser.dew.js", - "/npm:lie@3.3?dew": "./resources/vendor/dev-jspm-io/npm_lie@3.3.js", - "/npm:pako@1.0.11/index.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/index.dew.js", - "/npm:pako@1.0.11/lib/deflate.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/deflate.dew.js", - "/npm:pako@1.0.11/lib/inflate.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/inflate.dew.js", - "/npm:pako@1.0.11/lib/utils/common.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/utils/common.dew.js", - "/npm:pako@1.0.11/lib/utils/strings.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/utils/strings.dew.js", - "/npm:pako@1.0.11/lib/zlib/adler32.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/zlib/adler32.dew.js", - "/npm:pako@1.0.11/lib/zlib/constants.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/zlib/constants.dew.js", - "/npm:pako@1.0.11/lib/zlib/crc32.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/zlib/crc32.dew.js", - "/npm:pako@1.0.11/lib/zlib/deflate.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/zlib/deflate.dew.js", - "/npm:pako@1.0.11/lib/zlib/gzheader.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/zlib/gzheader.dew.js", - "/npm:pako@1.0.11/lib/zlib/inffast.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/zlib/inffast.dew.js", - "/npm:pako@1.0.11/lib/zlib/inflate.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/zlib/inflate.dew.js", - "/npm:pako@1.0.11/lib/zlib/inftrees.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/zlib/inftrees.dew.js", - "/npm:pako@1.0.11/lib/zlib/messages.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/zlib/messages.dew.js", - "/npm:pako@1.0.11/lib/zlib/trees.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/zlib/trees.dew.js", - "/npm:pako@1.0.11/lib/zlib/zstream.dew.js": "./resources/vendor/dev-jspm-io/npm_pako@1-0-11/lib/zlib/zstream.dew.js", - "/npm:pako@1.0?dew": "./resources/vendor/dev-jspm-io/npm_pako@1.0.js", - "/npm:set-immediate-shim@1.0.1/index.dew.js": "./resources/vendor/dev-jspm-io/npm_set-immediate-shim@1-0-1/index.dew.js", - "/npm:set-immediate-shim@1.0?dew": "./resources/vendor/dev-jspm-io/npm_set-immediate-shim@1.0.js" - } + "https://deno.land/std@0.91.0/fs/ensure_dir.ts": "https://deno.land/std@0.217.0/fs/ensure_dir.ts" } } diff --git a/src/preview/preview-server.ts b/src/preview/preview-server.ts index 7deabc29553..75a1ed9485d 100644 --- a/src/preview/preview-server.ts +++ b/src/preview/preview-server.ts @@ -4,7 +4,7 @@ * Copyright (C) 2020-2022 Posit Software, PBC */ -import { MuxAsyncIterator } from "async/mux-async-iterator"; +import { MuxAsyncIterator } from "async"; import { isWindows } from "../deno_ral/platform.ts"; export interface PreviewServer { diff --git a/src/publish/common/bundle.ts b/src/publish/common/bundle.ts index 363539f8e7d..b3d2f70c80e 100644 --- a/src/publish/common/bundle.ts +++ b/src/publish/common/bundle.ts @@ -13,7 +13,8 @@ import { md5HashBytes } from "../../core/hash.ts"; import { pathWithForwardSlashes } from "../../core/path.ts"; import { copy } from "io/copy"; -import { Tar } from "archive/tar"; +import { TarStream, type TarStreamInput } from "tar/tar-stream"; +import { createTarFromFiles } from "../../deno_ral/tar.ts"; interface ManifestMetadata { appmode: string; @@ -94,20 +95,22 @@ export async function createBundle( ); // create tar - const tar = new Tar(); + // const tar = new Tar(); const tarFiles = [...files.files, "manifest.json"]; - for (const tarFile of tarFiles) { - await tar.append(pathWithForwardSlashes(tarFile), { - filePath: join(stageDir, tarFile), - }); - } + // for (const tarFile of tarFiles) { + // await tar.append(pathWithForwardSlashes(tarFile), { + // filePath: join(stageDir, tarFile), + // }); + // } - // write to temp file + // // write to temp file const tarFile = tempContext.createFile({ suffix: ".tar" }); - const writer = Deno.openSync(tarFile, { write: true, create: true }); - await copy(tar.getReader(), writer); - writer.close(); + // const writer = Deno.openSync(tarFile, { write: true, create: true }); + // await copy(tar.getReader(), writer); + // writer.close(); + + await createTarFromFiles(tarFile, tarFiles); // compress to tar.gz const targzFile = `${tarFile}.gz`; diff --git a/src/quarto-core/dotenv.ts b/src/quarto-core/dotenv.ts index d8513fe3541..fa57cb319bb 100644 --- a/src/quarto-core/dotenv.ts +++ b/src/quarto-core/dotenv.ts @@ -20,13 +20,15 @@ const kQuartoEnvRequired = `${kQuartoEnv}.required`; // read the QUARTO_PROFILE from dotenv if it's there export async function dotenvQuartoProfile(projectDir: string) { // read config - const conf = await config({ - defaultsPath: join(projectDir, kQuartoEnv), + const conf1 = await config({ + envPath: join(projectDir, kQuartoEnv), + }); + const conf2 = await config({ envPath: join(projectDir, kQuartoEnvLocal), }); // return profile if we have it - return conf[kQuartoProfile]; + return conf2[kQuartoProfile] || conf1[kQuartoProfile] || ""; } // process dotenv files -- note that we track the processing we have done @@ -84,8 +86,6 @@ export async function dotenvSetVariables(projectDir: string) { // seems to indicate that we shouldn't be using examplePath here... await config({ envPath: definedEnvTempPath, - examplePath: dotenvRequired, - allowEmptyValues: true, }); } diff --git a/src/resources/vendor/README.md b/src/resources/vendor/README.md deleted file mode 100644 index 9f5b9ea01fc..00000000000 --- a/src/resources/vendor/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The macOS notarization procedure doesn't like directories with periods in their names. - -We replace all the periods with dashes, then edit the import map to do the right thing. - -This needs to happen every time we update our `deno vendor` dependencies. diff --git a/src/resources/vendor/deno-land/std@0-91-0/_util/assert.ts b/src/resources/vendor/deno-land/std@0-91-0/_util/assert.ts deleted file mode 100644 index 2588190decc..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/_util/assert.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. - -export class DenoStdInternalError extends Error { - constructor(message: string) { - super(message); - this.name = "DenoStdInternalError"; - } -} - -/** Make an assertion, if not `true`, then throw. */ -export function assert(expr: unknown, msg = ""): asserts expr { - if (!expr) { - throw new DenoStdInternalError(msg); - } -} diff --git a/src/resources/vendor/deno-land/std@0-91-0/_util/os.ts b/src/resources/vendor/deno-land/std@0-91-0/_util/os.ts deleted file mode 100644 index 3b56b6d8a11..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/_util/os.ts +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// This module is browser compatible. - -export const osType = (() => { - if (globalThis.Deno != null) { - return Deno.build.os; - } - - // deno-lint-ignore no-explicit-any - const navigator = (globalThis as any).navigator; - if (navigator?.appVersion?.includes?.("Win") ?? false) { - return "windows"; - } - - return "linux"; -})(); - -export const isWindows = osType === "windows"; diff --git a/src/resources/vendor/deno-land/std@0-91-0/encoding/base64.ts b/src/resources/vendor/deno-land/std@0-91-0/encoding/base64.ts deleted file mode 100644 index 98e3407d859..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/encoding/base64.ts +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. - -// deno-fmt-ignore -const base64abc = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", - "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", - "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", - "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", - "5", "6", "7", "8", "9", "+", "/"]; - -/** - * CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727 - * Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation - * @param data - */ -export function encode(data: ArrayBuffer | string): string { - const uint8 = typeof data === "string" - ? new TextEncoder().encode(data) - : data instanceof Uint8Array - ? data - : new Uint8Array(data); - let result = "", - i; - const l = uint8.length; - for (i = 2; i < l; i += 3) { - result += base64abc[uint8[i - 2] >> 2]; - result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; - result += base64abc[((uint8[i - 1] & 0x0f) << 2) | (uint8[i] >> 6)]; - result += base64abc[uint8[i] & 0x3f]; - } - if (i === l + 1) { - // 1 octet yet to write - result += base64abc[uint8[i - 2] >> 2]; - result += base64abc[(uint8[i - 2] & 0x03) << 4]; - result += "=="; - } - if (i === l) { - // 2 octets yet to write - result += base64abc[uint8[i - 2] >> 2]; - result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; - result += base64abc[(uint8[i - 1] & 0x0f) << 2]; - result += "="; - } - return result; -} - -/** - * Decodes a given RFC4648 base64 encoded string - * @param b64 - */ -export function decode(b64: string): Uint8Array { - const binString = atob(b64); - const size = binString.length; - const bytes = new Uint8Array(size); - for (let i = 0; i < size; i++) { - bytes[i] = binString.charCodeAt(i); - } - return bytes; -} diff --git a/src/resources/vendor/deno-land/std@0-91-0/encoding/hex.ts b/src/resources/vendor/deno-land/std@0-91-0/encoding/hex.ts deleted file mode 100644 index c5cb519730d..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/encoding/hex.ts +++ /dev/null @@ -1,111 +0,0 @@ -// Ported from Go -// https://github.com/golang/go/blob/go1.12.5/src/encoding/hex/hex.go -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. - -const hexTable = new TextEncoder().encode("0123456789abcdef"); - -/** - * ErrInvalidByte takes an invalid byte and returns an Error. - * @param byte - */ -export function errInvalidByte(byte: number): Error { - return new Error( - "encoding/hex: invalid byte: " + - new TextDecoder().decode(new Uint8Array([byte])), - ); -} - -/** ErrLength returns an error about odd string length. */ -export function errLength(): Error { - return new Error("encoding/hex: odd length hex string"); -} - -// fromHexChar converts a hex character into its value. -function fromHexChar(byte: number): number { - // '0' <= byte && byte <= '9' - if (48 <= byte && byte <= 57) return byte - 48; - // 'a' <= byte && byte <= 'f' - if (97 <= byte && byte <= 102) return byte - 97 + 10; - // 'A' <= byte && byte <= 'F' - if (65 <= byte && byte <= 70) return byte - 65 + 10; - - throw errInvalidByte(byte); -} - -/** - * EncodedLen returns the length of an encoding of n source bytes. Specifically, - * it returns n * 2. - * @param n - */ -export function encodedLen(n: number): number { - return n * 2; -} - -/** - * Encode encodes `src` into `encodedLen(src.length)` bytes. - * @param src - */ -export function encode(src: Uint8Array): Uint8Array { - const dst = new Uint8Array(encodedLen(src.length)); - for (let i = 0; i < dst.length; i++) { - const v = src[i]; - dst[i * 2] = hexTable[v >> 4]; - dst[i * 2 + 1] = hexTable[v & 0x0f]; - } - return dst; -} - -/** - * EncodeToString returns the hexadecimal encoding of `src`. - * @param src - */ -export function encodeToString(src: Uint8Array): string { - return new TextDecoder().decode(encode(src)); -} - -/** - * Decode decodes `src` into `decodedLen(src.length)` bytes - * If the input is malformed an error will be thrown - * the error. - * @param src - */ -export function decode(src: Uint8Array): Uint8Array { - const dst = new Uint8Array(decodedLen(src.length)); - for (let i = 0; i < dst.length; i++) { - const a = fromHexChar(src[i * 2]); - const b = fromHexChar(src[i * 2 + 1]); - dst[i] = (a << 4) | b; - } - - if (src.length % 2 == 1) { - // Check for invalid char before reporting bad length, - // since the invalid char (if present) is an earlier problem. - fromHexChar(src[dst.length * 2]); - throw errLength(); - } - - return dst; -} - -/** - * DecodedLen returns the length of decoding `x` source bytes. - * Specifically, it returns `x / 2`. - * @param x - */ -export function decodedLen(x: number): number { - return x >>> 1; -} - -/** - * DecodeString returns the bytes represented by the hexadecimal string `s`. - * DecodeString expects that src contains only hexadecimal characters and that - * src has even length. - * If the input is malformed, DecodeString will throw an error. - * @param s the `string` to decode to `Uint8Array` - */ -export function decodeString(s: string): Uint8Array { - return decode(new TextEncoder().encode(s)); -} diff --git a/src/resources/vendor/deno-land/std@0-91-0/fs/_util.ts b/src/resources/vendor/deno-land/std@0-91-0/fs/_util.ts deleted file mode 100644 index a9445a39475..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/fs/_util.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -import * as path from "../path/mod.ts"; - -/** - * Test whether or not `dest` is a sub-directory of `src` - * @param src src file path - * @param dest dest file path - * @param sep path separator - */ -export function isSubdir( - src: string, - dest: string, - sep: string = path.sep, -): boolean { - if (src === dest) { - return false; - } - const srcArray = src.split(sep); - const destArray = dest.split(sep); - return srcArray.every((current, i) => destArray[i] === current); -} - -export type PathType = "file" | "dir" | "symlink"; - -/** - * Get a human readable file type string. - * - * @param fileInfo A FileInfo describes a file and is returned by `stat`, - * `lstat` - */ -export function getFileInfoType(fileInfo: Deno.FileInfo): PathType | undefined { - return fileInfo.isFile - ? "file" - : fileInfo.isDirectory - ? "dir" - : fileInfo.isSymlink - ? "symlink" - : undefined; -} diff --git a/src/resources/vendor/deno-land/std@0-91-0/fs/ensure_dir.ts b/src/resources/vendor/deno-land/std@0-91-0/fs/ensure_dir.ts deleted file mode 100644 index 20259a6f722..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/fs/ensure_dir.ts +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -import { getFileInfoType } from "./_util.ts"; - -/** - * Ensures that the directory exists. - * If the directory structure does not exist, it is created. Like mkdir -p. - * Requires the `--allow-read` and `--allow-write` flag. - */ -export async function ensureDir(dir: string): Promise { - try { - const fileInfo = await Deno.lstat(dir); - if (!fileInfo.isDirectory) { - throw new Error( - `Ensure path exists, expected 'dir', got '${ - getFileInfoType(fileInfo) - }'`, - ); - } - } catch (err) { - if (err instanceof Deno.errors.NotFound) { - // if dir not exists. then create it. - await Deno.mkdir(dir, { recursive: true }); - return; - } - throw err; - } -} - -/** - * Ensures that the directory exists. - * If the directory structure does not exist, it is created. Like mkdir -p. - * Requires the `--allow-read` and `--allow-write` flag. - */ -export function ensureDirSync(dir: string): void { - try { - const fileInfo = Deno.lstatSync(dir); - if (!fileInfo.isDirectory) { - throw new Error( - `Ensure path exists, expected 'dir', got '${ - getFileInfoType(fileInfo) - }'`, - ); - } - } catch (err) { - if (err instanceof Deno.errors.NotFound) { - // if dir not exists. then create it. - Deno.mkdirSync(dir, { recursive: true }); - return; - } - throw err; - } -} diff --git a/src/resources/vendor/deno-land/std@0-91-0/fs/exists.ts b/src/resources/vendor/deno-land/std@0-91-0/fs/exists.ts deleted file mode 100644 index e98bbcc70fd..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/fs/exists.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -/** - * Test whether or not the given path exists by checking with the file system - */ -export async function exists(filePath: string): Promise { - try { - await Deno.lstat(filePath); - return true; - } catch (err) { - if (err instanceof Deno.errors.NotFound) { - return false; - } - - throw err; - } -} - -/** - * Test whether or not the given path exists by checking with the file system - */ -export function existsSync(filePath: string): boolean { - try { - Deno.lstatSync(filePath); - return true; - } catch (err) { - if (err instanceof Deno.errors.NotFound) { - return false; - } - throw err; - } -} diff --git a/src/resources/vendor/deno-land/std@0-91-0/hash/_wasm/hash.ts b/src/resources/vendor/deno-land/std@0-91-0/hash/_wasm/hash.ts deleted file mode 100644 index fa2b918725e..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/hash/_wasm/hash.ts +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. - -import init, { - create_hash as createHash, - DenoHash, - digest_hash as digestHash, - source, - update_hash as updateHash, -} from "./wasm.js"; - -import * as hex from "../../encoding/hex.ts"; -import * as base64 from "../../encoding/base64.ts"; -import type { Hasher, Message, OutputFormat } from "../hasher.ts"; - -await init(source); - -const TYPE_ERROR_MSG = "hash: `data` is invalid type"; - -export class Hash implements Hasher { - #hash: DenoHash; - #digested: boolean; - - constructor(algorithm: string) { - this.#hash = createHash(algorithm); - this.#digested = false; - } - - /** - * Update internal state - * @param data data to update - */ - update(data: Message): this { - let msg: Uint8Array; - - if (typeof data === "string") { - msg = new TextEncoder().encode(data as string); - } else if (typeof data === "object") { - if (data instanceof ArrayBuffer || ArrayBuffer.isView(data)) { - msg = new Uint8Array(data); - } else { - throw new Error(TYPE_ERROR_MSG); - } - } else { - throw new Error(TYPE_ERROR_MSG); - } - - updateHash(this.#hash, msg); - - return this; - } - - /** Returns final hash */ - digest(): ArrayBuffer { - if (this.#digested) throw new Error("hash: already digested"); - - this.#digested = true; - return digestHash(this.#hash); - } - - /** - * Returns hash as a string of given format - * @param format format of output string (hex or base64). Default is hex - */ - toString(format: OutputFormat = "hex"): string { - const finalized = new Uint8Array(this.digest()); - - switch (format) { - case "hex": - return hex.encodeToString(finalized); - case "base64": - return base64.encode(finalized); - default: - throw new Error("hash: invalid format"); - } - } -} diff --git a/src/resources/vendor/deno-land/std@0-91-0/hash/_wasm/wasm.js b/src/resources/vendor/deno-land/std@0-91-0/hash/_wasm/wasm.js deleted file mode 100644 index be575343aa6..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/hash/_wasm/wasm.js +++ /dev/null @@ -1,271 +0,0 @@ -// deno-lint-ignore-file -//deno-fmt-ignore-file -//deno-lint-ignore-file -import * as base64 from "../../encoding/base64.ts"; -export const source = base64.decode( - "AGFzbQEAAAABSQxgAn9/AGACf38Bf2ADf39/AGADf39/AX9gAX8AYAF/AX9gAABgBH9/f38Bf2AFf39/f38AYAV/f39/fwF/YAJ+fwF/YAF/AX4CTQMDd2JnFV9fd2JpbmRnZW5fc3RyaW5nX25ldwABA3diZxBfX3diaW5kZ2VuX3Rocm93AAADd2JnEl9fd2JpbmRnZW5fcmV0aHJvdwAEA6sBqQEAAgEAAAIFAAACAAQABAADAAAAAQcJAAAAAAAAAAAAAAAAAAAAAAICAgIAAAAAAAAAAAAAAAAAAAACAgICBAAAAgAAAQAAAAAAAAAAAAAAAAAECgEEAQIAAAAAAgIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAQEAgICAAEGAAMEAgcEAgQEAwMFBAQAAwQDAQEBAQQABwYBBgYBAAELBQUFBQUFBQAEBAUBcAFpaQUDAQARBgkBfwFBgIDAAAsHoQEJBm1lbW9yeQIAE19fd2JnX2Rlbm9oYXNoX2ZyZWUAhAELY3JlYXRlX2hhc2gABQt1cGRhdGVfaGFzaACFAQtkaWdlc3RfaGFzaACCARFfX3diaW5kZ2VuX21hbGxvYwCNARJfX3diaW5kZ2VuX3JlYWxsb2MAkwETX193YmluZGdlbl9leHBvcnRfMgMAD19fd2JpbmRnZW5fZnJlZQCZAQmPAQEAQQELaJcBqgGcAZYBnwFYqwFDDy5XowE3PEFIkgGjAWA/QkliPi9EjgGlAVI9GSiHAaQBR2EwRY8BU18nOooBqAFQIS2JAakBUVkTHnunAUsVJnqmAUoqNjiYAagBcSkyNJgBqQF1LBocm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CADcDACACQZADaiIKIAJBvAFqKQIANwMAIAJBiANqIgYgAkG0AWopAgA3AwAgAkGAA2oiByACQawBaikCADcDACACQfgCaiIIIAJBpAFqKQIANwMAIAIgAikCnAE3A/ACQeAAQQgQoQEiA0UNGSADQQA2AgggA0IANwMAIAMgAikD8AI3AgwgA0EUaiAIKQMANwIAIANBHGogBykDADcCACADQSRqIAYpAwA3AgAgA0EsaiAKKQMANwIAIANBNGogCSkDADcCACADQTxqIAUpAwA3AgAgA0HEAGogBCkDADcCACADQdQAakHIl8AAKQIANwIAIANBwJfAACkCADcCTEHUgMAAIQRBAAwSCyAAQfiAwABGDQUgAEH4gMAAQQkQgwFFDQUgAEGogcAARg0GIABBqIHAAEEJEIMBRQ0GIABB4ITAAEYNDSAAQeCEwAAgARCDAUUNDSAAQZCFwABGDQ4gAEGQhcAAIAEQgwFFDQ4gAEHAhcAARg0PIABBwIXAACABEIMBRQ0PIABB8IXAAEcEQCAAQfCFwAAgARCDAQ0RCyACQZgBakEAQcgBEJEBGiACQf4CakIANwEAIAJBhgNqQgA3AQAgAkGOA2pCADcBACACQZYDakIANwEAIAJBngNqQgA3AQAgAkGmA2pCADcBACACQa4DakIANwEAIAJBtgNqQQA2AQAgAkG6A2pBADsBACACQQA7AfQCIAJCADcB9gIgAkHIADYC8AIgAkGIBGogAkHwAmpBzAAQiwEaIAJBCGogAkGIBGpBBHJByAAQiwEaQZgCQQgQoQEiA0UNHiADIAJBmAFqQcgBEIsBIgRBADYCyAEgBEHMAWogAkEIakHIABCLARpB/IXAACEEQQAMEQsgAEHYgcAARwRAIAAoAABB89CFiwNHDRALIAJBkgRqQgA3AQAgAkGaBGpBADsBACACQZwEakIANwIAIAJBpARqQgA3AgAgAkGsBGpCADcCACACQbQEakIANwIAIAJBvARqQgA3AgAgAkHEBGpBADoAACACQcUEakEANgAAIAJByQRqQQA7AAAgAkHLBGpBADoAACACQcAANgKIBCACQQA7AYwEIAJBADYBjgQgAkGYAWogAkGIBGpBxAAQiwEaIAJBqANqIgQgAkHUAWopAgA3AwAgAkGgA2oiBSACQcwBaikCADcDACACQZgDaiIJIAJBxAFqKQIANwMAIAJBkANqIgogAkG8AWopAgA3AwAgAkGIA2oiBiACQbQBaikCADcDACACQYADaiIHIAJBrAFqKQIANwMAIAJB+AJqIgggAkGkAWopAgA3AwAgAiACKQKcATcD8AJB4ABBCBChASIDRQ0XIANCADcDACADQQA2AhwgAyACKQPwAjcDICADQfiXwAApAwA3AwggA0EQakGAmMAAKQMANwMAIANBGGpBiJjAACgCADYCACADQShqIAgpAwA3AwAgA0EwaiAHKQMANwMAIANBOGogBikDADcDACADQUBrIAopAwA3AwAgA0HIAGogCSkDADcDACADQdAAaiAFKQMANwMAIANB2ABqIAQpAwA3AwBB3IHAACEEQQAMEAsgAEGAgsAARg0FIABBgILAAEEGEIMBRQ0FIABBrILAAEYNBiAAQayCwABBBhCDAUUNBiAAQdiCwABGDQcgAEHYgsAAQQYQgwFFDQcgAEGEg8AARwRAIABBhIPAAEEGEIMBDQ8LIAJBADYCiAQgAkGIBGpBBHIhBEEAIQMDQCADIARqQQA6AAAgAiACKAKIBEEBajYCiAQgA0EBaiIDQYABRw0ACyACQZgBaiACQYgEakGEARCLARogAkHwAmogAkGYAWpBBHJBgAEQiwEaQdgBQQgQoQEiA0UNGCADQgA3AwggA0IANwMAIANBADYCUCADQZCZwAApAwA3AxAgA0EYakGYmcAAKQMANwMAIANBIGpBoJnAACkDADcDACADQShqQaiZwAApAwA3AwAgA0EwakGwmcAAKQMANwMAIANBOGpBuJnAACkDADcDACADQUBrQcCZwAApAwA3AwAgA0HIAGpByJnAACkDADcDACADQdQAaiACQfACakGAARCLARpBjIPAACEEQQAMDwsgAEGwg8AARg0HIAApAABC89CFm9PFjJk0UQ0HIABB3IPAAEYNCCAAKQAAQvPQhZvTxcyaNlENCCAAQYiEwABGDQkgACkAAELz0IWb0+WMnDRRDQkgAEG0hMAARwRAIAApAABC89CFm9OlzZgyUg0OCyACQZgBakEAQcgBEJEBGiACQf4CakIANwEAIAJBhgNqQgA3AQAgAkGOA2pCADcBACACQZYDakIANwEAIAJBngNqQgA3AQAgAkGmA2pCADcBACACQa4DakIANwEAIAJBtgNqQQA2AQAgAkG6A2pBADsBACACQQA7AfQCIAJCADcB9gIgAkHIADYC8AIgAkGIBGogAkHwAmpBzAAQiwEaIAJBCGogAkGIBGpBBHJByAAQiwEaQZgCQQgQoQEiA0UNGyADIAJBmAFqQcgBEIsBIgRBADYCyAEgBEHMAWogAkEIakHIABCLARpBvITAACEEQQAMDgsgAkGSBGpCADcBACACQZoEakEAOwEAIAJBEDYCiAQgAkEAOwGMBCACQQA2AY4EIAJBqAFqIgMgAkGYBGoiBCgCADYCACACQaABaiIJIAJBkARqIgUpAwA3AwAgAkHoAmoiBiACQaQBaikCADcDACACIAIpA4gENwOYASACIAIpApwBNwPgAiACQcABaiIHQgA3AwAgAkG4AWoiCEIANwMAIAJBsAFqIg1CADcDACADQgA3AwAgCUIANwMAIAJCADcDmAEgAkH6AmpCADcBACACQYIDakEAOwEAIAJBEDYC8AIgAkEAOwH0AiACQQA2AfYCIAQgAkGAA2ooAgA2AgAgBSACQfgCaiIKKQMANwMAIAJBEGoiCyACQZQEaikCADcDACACIAIpA/ACNwOIBCACIAIpAowENwMIIAJB0AFqIgwgCykDADcDACACIAIpAwg3A8gBIAogBikDADcDACACIAIpA+ACNwPwAiACQcAEaiIGIAwpAwA3AwAgAkG4BGoiCyACKQPIATcDACACQbAEaiIMIAcpAwA3AwAgAkGoBGoiByAIKQMANwMAIAJBoARqIgggDSkDADcDACAEIAMpAwA3AwAgBSAJKQMANwMAIAIgAikDmAE3A4gEQdQAQQQQoQEiA0UNDiADQQA2AgAgAyACKQPwAjcCBCADIAIpA4gENwIUIANBDGogCikDADcCACADQRxqIAUpAwA3AgAgA0EkaiAEKQMANwIAIANBLGogCCkDADcCACADQTRqIAcpAwA3AgAgA0E8aiAMKQMANwIAIANBxABqIAspAwA3AgAgA0HMAGogBikDADcCAEGEgMAAIQRBAAwNCyACQZIEakIANwEAIAJBmgRqQQA7AQAgAkGcBGpCADcCACACQaQEakIANwIAIAJBrARqQgA3AgAgAkG0BGpCADcCACACQbwEakIANwIAIAJBxARqQQA6AAAgAkHFBGpBADYAACACQckEakEAOwAAIAJBywRqQQA6AAAgAkHAADYCiAQgAkEAOwGMBCACQQA2AY4EIAJBmAFqIAJBiARqQcQAEIsBGiACQagDaiIEIAJB1AFqKQIANwMAIAJBoANqIgUgAkHMAWopAgA3AwAgAkGYA2oiCSACQcQBaikCADcDACACQZADaiIKIAJBvAFqKQIANwMAIAJBiANqIgYgAkG0AWopAgA3AwAgAkGAA2oiByACQawBaikCADcDACACQfgCaiIIIAJBpAFqKQIANwMAIAIgAikCnAE3A/ACQeAAQQgQoQEiA0UNEyADQQA2AgggA0IANwMAIAMgAikD8AI3AgwgA0EUaiAIKQMANwIAIANBHGogBykDADcCACADQSRqIAYpAwA3AgAgA0EsaiAKKQMANwIAIANBNGogCSkDADcCACADQTxqIAUpAwA3AgAgA0HEAGogBCkDADcCACADQdQAakHIl8AAKQIANwIAIANBwJfAACkCADcCTEGsgMAAIQRBAAwMCyACQZIEakIANwEAIAJBmgRqQQA7AQAgAkGcBGpCADcCACACQaQEakIANwIAIAJBrARqQgA3AgAgAkG0BGpCADcCACACQbwEakIANwIAIAJBxARqQQA6AAAgAkHFBGpBADYAACACQckEakEAOwAAIAJBywRqQQA6AAAgAkHAADYCiAQgAkEAOwGMBCACQQA2AY4EIAJBmAFqIAJBiARqQcQAEIsBGiACQagDaiIEIAJB1AFqKQIANwMAIAJBoANqIgUgAkHMAWopAgA3AwAgAkGYA2oiCSACQcQBaikCADcDACACQZADaiIKIAJBvAFqKQIANwMAIAJBiANqIgYgAkG0AWopAgA3AwAgAkGAA2oiByACQawBaikCADcDACACQfgCaiIIIAJBpAFqKQIANwMAIAIgAikCnAE3A/ACQeAAQQgQoQEiA0UNEiADQgA3AwAgA0EANgIcIAMgAikD8AI3AyAgA0H4l8AAKQMANwMIIANBEGpBgJjAACkDADcDACADQRhqQYiYwAAoAgA2AgAgA0EoaiAIKQMANwMAIANBMGogBykDADcDACADQThqIAYpAwA3AwAgA0FAayAKKQMANwMAIANByABqIAkpAwA3AwAgA0HQAGogBSkDADcDACADQdgAaiAEKQMANwMAQYSBwAAhBEEADAsLIAJBkgRqQgA3AQAgAkGaBGpBADsBACACQZwEakIANwIAIAJBpARqQgA3AgAgAkGsBGpCADcCACACQbQEakIANwIAIAJBvARqQgA3AgAgAkHEBGpBADoAACACQcUEakEANgAAIAJByQRqQQA7AAAgAkHLBGpBADoAACACQcAANgKIBCACQQA7AYwEIAJBADYBjgQgAkGYAWogAkGIBGpBxAAQiwEaIAJBqANqIgQgAkHUAWopAgA3AwAgAkGgA2oiBSACQcwBaikCADcDACACQZgDaiIJIAJBxAFqKQIANwMAIAJBkANqIgogAkG8AWopAgA3AwAgAkGIA2oiBiACQbQBaikCADcDACACQYADaiIHIAJBrAFqKQIANwMAIAJB+AJqIgggAkGkAWopAgA3AwAgAiACKQKcATcD8AJB+ABBCBChASIDRQ0MIANCADcDACADQQA2AjAgAyACKQPwAjcCNCADQdCXwAApAwA3AwggA0EQakHYl8AAKQMANwMAIANBGGpB4JfAACkDADcDACADQSBqQeiXwAApAwA3AwAgA0EoakHwl8AAKQMANwMAIANBPGogCCkDADcCACADQcQAaiAHKQMANwIAIANBzABqIAYpAwA3AgAgA0HUAGogCikDADcCACADQdwAaiAJKQMANwIAIANB5ABqIAUpAwA3AgAgA0HsAGogBCkDADcCAEG0gcAAIQRBAAwKCyACQZIEakIANwEAIAJBmgRqQQA7AQAgAkGcBGpCADcCACACQaQEakIANwIAIAJBrARqQgA3AgAgAkG0BGpCADcCACACQbwEakIANwIAIAJBxARqQQA6AAAgAkHFBGpBADYAACACQckEakEAOwAAIAJBywRqQQA6AAAgAkHAADYCiAQgAkEAOwGMBCACQQA2AY4EIAJBmAFqIAJBiARqQcQAEIsBGiACQagDaiIEIAJB1AFqKQIANwMAIAJBoANqIgUgAkHMAWopAgA3AwAgAkGYA2oiCSACQcQBaikCADcDACACQZADaiIKIAJBvAFqKQIANwMAIAJBiANqIgYgAkG0AWopAgA3AwAgAkGAA2oiByACQawBaikCADcDACACQfgCaiIIIAJBpAFqKQIANwMAIAIgAikCnAE3A/ACQfAAQQgQoQEiA0UNESADQQA2AgggA0IANwMAIAMgAikD8AI3AgwgA0EUaiAIKQMANwIAIANBHGogBykDADcCACADQSRqIAYpAwA3AgAgA0EsaiAKKQMANwIAIANBNGogCSkDADcCACADQTxqIAUpAwA3AgAgA0HEAGogBCkDADcCACADQeQAakGkmMAAKQIANwIAIANB3ABqQZyYwAApAgA3AgAgA0HUAGpBlJjAACkCADcCACADQYyYwAApAgA3AkxBiILAACEEQQAMCQsgAkGSBGpCADcBACACQZoEakEAOwEAIAJBnARqQgA3AgAgAkGkBGpCADcCACACQawEakIANwIAIAJBtARqQgA3AgAgAkG8BGpCADcCACACQcQEakEAOgAAIAJBxQRqQQA2AAAgAkHJBGpBADsAACACQcsEakEAOgAAIAJBwAA2AogEIAJBADsBjAQgAkEANgGOBCACQZgBaiACQYgEakHEABCLARogAkGoA2oiBCACQdQBaikCADcDACACQaADaiIFIAJBzAFqKQIANwMAIAJBmANqIgkgAkHEAWopAgA3AwAgAkGQA2oiCiACQbwBaikCADcDACACQYgDaiIGIAJBtAFqKQIANwMAIAJBgANqIgcgAkGsAWopAgA3AwAgAkH4AmoiCCACQaQBaikCADcDACACIAIpApwBNwPwAkHwAEEIEKEBIgNFDRAgA0EANgIIIANCADcDACADIAIpA/ACNwIMIANBFGogCCkDADcCACADQRxqIAcpAwA3AgAgA0EkaiAGKQMANwIAIANBLGogCikDADcCACADQTRqIAkpAwA3AgAgA0E8aiAFKQMANwIAIANBxABqIAQpAwA3AgAgA0HkAGpBxJjAACkCADcCACADQdwAakG8mMAAKQIANwIAIANB1ABqQbSYwAApAgA3AgAgA0GsmMAAKQIANwJMQbSCwAAhBEEADAgLIAJBADYCiAQgAkGIBGpBBHIhBEEAIQMDQCADIARqQQA6AAAgAiACKAKIBEEBajYCiAQgA0EBaiIDQYABRw0ACyACQZgBaiACQYgEakGEARCLARogAkHwAmogAkGYAWpBBHJBgAEQiwEaQdgBQQgQoQEiA0UNECADQgA3AwggA0IANwMAIANBADYCUCADQdCYwAApAwA3AxAgA0EYakHYmMAAKQMANwMAIANBIGpB4JjAACkDADcDACADQShqQeiYwAApAwA3AwAgA0EwakHwmMAAKQMANwMAIANBOGpB+JjAACkDADcDACADQUBrQYCZwAApAwA3AwAgA0HIAGpBiJnAACkDADcDACADQdQAaiACQfACakGAARCLARpB4ILAACEEQQAMBwsgAkGYAWpBAEHIARCRARogAkEANgLwAkEEIQMDQCACQfACaiADakEAOgAAIAIgAigC8AJBAWo2AvACIANBAWoiA0GUAUcNAAsgAkGIBGogAkHwAmpBlAEQiwEaIAJBCGogAkGIBGpBBHJBkAEQiwEaQeACQQgQoQEiA0UNECADIAJBmAFqQcgBEIsBIgRBADYCyAEgBEHMAWogAkEIakGQARCLARpBuIPAACEEQQAMBgsgAkGYAWpBAEHIARCRARogAkEANgLwAkEEIQMDQCACQfACaiADakEAOgAAIAIgAigC8AJBAWo2AvACIANBAWoiA0GMAUcNAAsgAkGIBGogAkHwAmpBjAEQiwEaIAJBCGogAkGIBGpBBHJBiAEQiwEaQdgCQQgQoQEiA0UNECADIAJBmAFqQcgBEIsBIgRBADYCyAEgBEHMAWogAkEIakGIARCLARpB5IPAACEEQQAMBQsgAkGYAWpBAEHIARCRARogAkEANgLwAkEEIQMDQCACQfACaiADakEAOgAAIAIgAigC8AJBAWo2AvACIANBAWoiA0HsAEcNAAsgAkGIBGogAkHwAmpB7AAQiwEaIAJBCGogAkGIBGpBBHJB6AAQiwEaQbgCQQgQoQEiA0UNECADIAJBmAFqQcgBEIsBIgRBADYCyAEgBEHMAWogAkEIakHoABCLARpBkITAACEEQQAMBAsgAkGYAWpBAEHIARCRARogAkEANgLwAkEEIQMDQCACQf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F/c3EgASADcXJqQdbunsZ+akEMdyABaiIEIAMgAigCDCILaiABIAQgBSAMKAIAIgxqIAMgBEF/c3EgASAEcXJqQdvhgaECakERd2oiAkF/c3EgAiAEcXJqQe6d9418akEWdyACaiIBQX9zcSABIAJxcmpBr5/wq39qQQd3IAFqIgNqIAQgFWogAiADQX9zcSABIANxcmpBqoyfvARqQQx3IANqIgQgASAOaiADIAQgAiAGaiABIARBf3NxIAMgBHFyakGTjMHBempBEXdqIgFBf3NxIAEgBHFyakGBqppqakEWdyABaiICQX9zcSABIAJxcmpB2LGCzAZqQQd3IAJqIgNqIAQgD2ogASADQX9zcSACIANxcmpBr++T2nhqQQx3IANqIgQgAiAQaiADIAQgASAKaiACIARBf3NxIAMgBHFyakGxt31qQRF3aiIBQX9zcSABIARxcmpBvq/zynhqQRZ3IAFqIgJBf3NxIAEgAnFyakGiosDcBmpBB3cgAmoiA2ogAiASaiADIAEgCGogAiADIAQgEWogASADQX9zcSACIANxcmpBk+PhbGpBDHdqIgFBf3MiBHEgASADcXJqQY6H5bN6akERdyABaiICQX9zIgVxIAEgAnFyakGhkNDNBGpBFncgAmoiAyABcSACIARxcmpB4sr4sH9qQQV3IANqIgRqIAMgE2ogAiAQaiABIAZqIAIgBHEgAyAFcXJqQcDmgoJ8akEJdyAEaiIBIANxIAQgA0F/c3FyakHRtPmyAmpBDncgAWoiAiAEcSABIARBf3NxcmpBqo/bzX5qQRR3IAJqIgMgAXEgAiABQX9zcXJqQd2gvLF9akEFdyADaiIEaiADIA1qIAIgEmogASAKaiACIARxIAMgAkF/c3FyakHTqJASakEJdyAEaiIBIANxIAQgA0F/c3FyakGBzYfFfWpBDncgAWoiAiAEcSABIARBf3NxcmpByPfPvn5qQRR3IAJqIgMgAXEgAiABQX9zcXJqQeabh48CakEFdyADaiIEaiADIAdqIAIgC2ogASAIaiACIARxIAMgAkF/c3FyakHWj9yZfGpBCXcgBGoiASADcSAEIANBf3NxcmpBh5vUpn9qQQ53IAFqIgIgBHEgASAEQX9zcXJqQe2p6KoEakEUdyACaiIDIAFxIAIgAUF/c3FyakGF0o/PempBBXcgA2oiBGogAyAJaiACIA5qIAEgDGogAiAEcSADIAJBf3NxcmpB+Me+Z2pBCXcgBGoiASADcSAEIANBf3NxcmpB2YW8uwZqQQ53IAFqIgMgBHEgASAEQX9zcXJqQYqZqel4akEUdyADaiIEIANzIgUgAXNqQcLyaGpBBHcgBGoiAmogAyAQaiABIAdqIAIgBXNqQYHtx7t4akELdyACaiIBIAIgBHNzakGiwvXsBmpBEHcgAWoiAyABcyAEIAhqIAEgAnMgA3NqQYzwlG9qQRd3IANqIgJzakHE1PulempBBHcgAmoiBGogAyAOaiABIA1qIAIgA3MgBHNqQamf+94EakELdyAEaiIBIAIgBHNzakHglu21f2pBEHcgAWoiAyABcyACIApqIAEgBHMgA3NqQfD4/vV7akEXdyADaiICc2pBxv3txAJqQQR3IAJqIgRqIAMgC2ogASATaiACIANzIARzakH6z4TVfmpBC3cgBGoiASACIARzc2pBheG8p31qQRB3IAFqIgMgAXMgAiAGaiABIARzIANzakGFuqAkakEXdyADaiICc2pBuaDTzn1qQQR3IAJqIgRqIAIgDGogASAJaiACIANzIARzakHls+62fmpBC3cgBGoiASAEcyADIBJqIAIgBHMgAXNqQfj5if0BakEQdyABaiICc2pB5ayxpXxqQRd3IAJqIgMgAUF/c3IgAnNqQcTEpKF/akEGdyADaiIEaiADIBVqIAIgCGogASAOaiAEIAJBf3NyIANzakGX/6uZBGpBCncgBGoiASADQX9zciAEc2pBp8fQ3HpqQQ93IAFqIgIgBEF/c3IgAXNqQbnAzmRqQRV3IAJqIgMgAUF/c3IgAnNqQcOz7aoGakEGdyADaiIEaiADIBRqIAIgCmogASALaiAEIAJBf3NyIANzakGSmbP4eGpBCncgBGoiASADQX9zciAEc2pB/ei/f2pBD3cgAWoiAiAEQX9zciABc2pB0buRrHhqQRV3IAJqIgMgAUF/c3IgAnNqQc/8of0GakEGdyADaiIEaiADIBFqIAIgBmogASASaiAE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QciUwABqLQAAcyIDOgAAIAJBAWoiAkEwRw0ACyAAIAAtADAgAS0AACAAQT9qIgMtAABzQciUwABqLQAAcyICOgAwIABBMWoiBCAELQAAIAIgAS0AAXNByJTAAGotAABzIgI6AAAgAEEyaiIEIAQtAAAgAiABLQACc0HIlMAAai0AAHMiAjoAACAAQTNqIgQgBC0AACACIAEtAANzQciUwABqLQAAcyICOgAAIABBNGoiBCAELQAAIAIgAS0ABHNByJTAAGotAABzIgI6AAAgAEE1aiIEIAQtAAAgAiABLQAFc0HIlMAAai0AAHMiAjoAACAAQTZqIgQgBC0AACACIAEtAAZzQciUwABqLQAAcyICOgAAIABBN2oiBCAELQAAIAIgAS0AB3NByJTAAGotAABzIgI6AAAgAEE4aiIEIAQtAAAgAiABLQAIc0HIlMAAai0AAHMiAjoAACAAQTlqIgQgBC0AACACIAEtAAlzQciUwABqLQAAcyICOgAAIABBOmoiBCAELQAAIAIgAS0ACnNByJTAAGotAABzIgI6AAAgAEE7aiIEIAQtAAAgAiABLQALc0HIlMAAai0AAHMiAjoAACAAQTxqIgQgBC0AACACIAEtAAxzQciUwABqLQAAcyICOgAAIABBPWoiBCAELQAAIAIgAS0ADXNByJTAAGotAABzIgI6AAAgAEE+aiIAIAAtAAAgAiABLQAOc0HIlMAAai0AAHMiADoAACADIAMtAAAgACABLQAPc0HIlMAAai0AAHM6AAAL3g8CD38BfiMAQcABayIDJAAgA0EAQYABEJEBIgNBuAFqIgQgAEE4aiIFKQMANwMAIANBsAFqIgYgAEEwaiIHKQMANwMAIANBqAFqIgggAEEoaiIJKQMANwMAIANBoAFqIgogAEEgaiILKQMANwMAIANBmAFqIgwgAEEYaiINKQMANwMAIANBkAFqIg4gAEEQaiIPKQMANwMAIANBiAFqIhAgAEEIaiIRKQMANwMAIAMgACkDADcDgAEgAgRAIAEgAkEHdGohAgNAIAMgASkAACISQjiGIBJCKIZCgICAgICAwP8Ag4QgEkIYhkKAgICAgOA/gyASQgiGQoCAgIDwH4OEhCASQgi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ADcnEgAiADcXJqakGZ84nUBWpBCXciASAEciAJIAIgASADIARycSADIARxcmpqQZnzidQFakENdyICcSABIARxcmogDGpBmfOJ1AVqQQN3IgMgDyABIAQgAyABIAJycSABIAJxcmogFWpBmfOJ1AVqQQV3IgQgAiADcnEgAiADcXJqakGZ84nUBWpBCXciASAEciARIAIgASADIARycSADIARxcmpqQZnzidQFakENdyICcSABIARxcmogC2pBmfOJ1AVqQQN3IgMgCiABIAYgBCADIAEgAnJxIAEgAnFyampBmfOJ1AVqQQV3IgQgAiADcnEgAiADcXJqakGZ84nUBWpBCXciASAEciAIIAIgASADIARycSADIARxcmpqQZnzidQFakENdyICcSABIARxcmogE2pBmfOJ1AVqQQN3IgMgEiACIBAgASAOIAQgAyABIAJycSABIAJxcmpqQZnzidQFakEFdyIEIAIgA3JxIAIgA3FyampBmfOJ1AVqQQl3IgUgAyAEcnEgAyAEcXJqakGZ84nUBWpBDXciAyAFcyICIARzaiAUakGh1+f2BmpBA3ciASAJIAMgASAHIAQgASACc2pqQaHX5/YGakEJdyICcyAFIA1qIAEgA3MgAnNqQaHX5/YGakELdyIEc2pqQaHX5/YGakEPdyIDIARzIgUgAnNqIAtqQaHX5/YGakEDdyIBIAggAyABIAogAiABIAVzampBodfn9gZqQQl3IgJzIAQgBmogASADcyACc2pBodfn9gZqQQt3IgRzampBodfn9gZqQQ93IgMgBHMiBSACc2ogDGpBodfn9gZqQQN3IgEgESADIAEgDyACIAEgBXNqakGh1+f2BmpBCXciAnMgBCAVaiABIANzIAJzakGh1+f2BmpBC3ciBHNqakGh1+f2BmpBD3ciAyAEcyIFIAJzaiATakGh1+f2BmpBA3ciASAAKAIAajYCACAAIBAgAiABIAVzampBodfn9gZqQQl3IgIgACgCDGo2AgwgACAEIA5qIAEgA3MgAnNqQaHX5/YGakELdyIEIAAoAghqNgIIIAAgACgCBCASIAMgASACcyAEc2pqQaHX5/YGakEPd2o2AgQLowgCAX8tfiAAKQPAASEQIAApA5gBIRwgACkDcCERIA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IAUgBEkNAyAFRQ0AIAIoAhAhBgJAIARFBEAgBhAQQQEhBQwBCyAGIAVBASAEEJoBIgVFDQULIAIgBDYCFCACIAU2AhALIAIoAhAhBSACQThqIgZCADcDACACQTBqIgdCADcDACACQShqIghCADcDACACQSBqIglCADcDACACQRhqIgpCADcDACACQgA3AxAgAkHqAGpCADcBACACQfIAakEAOwEAIAJBEDYCYCACQQA7AWQgAkEANgFmIAJBiAFqIAJB8ABqKAIANgIAIAJBgAFqIAJB6ABqKQMANwMAIAJB2ABqIgsgAkGEAWopAgA3AwAgAiACKQNgNwN4IAIgAikCfDcDUCACQcgAaiIMIAspAwA3AwAgAiACKQNQNwNAIANBOGogDCkDADcAACADQTBqIAIpA0A3AAAgA0EoaiAGKQMANwAAIANBIGogBykDADcAACADQRhqIAgpAwA3AAAgA0EQaiAJKQMANwAAIANBCGogCikDADcAACADIAIpAxA3AAAgAUEANgIAIAAgBDYCBCAAIAU2AgAgAkGQAWokAA8LQbCawABBFyACQRBqQaCXwABBsJfAABB5AAtBEEEBQbSlwAAoAgAiAEECIAAbEQAAAAtBh4zAAEEkQayMwAAQiAEACyAEQQFBtKXAACgCACIAQQIgABsRAAAAC9gIAQV/IABBeGoiASAAQXxqKAIAIgNBeHEiAGohAgJAAkACQAJAIANBAXENACADQQNxRQ0BIAEoAgAiAyAAaiEAIAEgA2siAUH8pMAAKAIARgRAIAIoAgRBA3FBA0cNAUH0pMAAIAA2AgAgAiACKAIEQX5xNgIEIAEgAEEBcjYCBCAAIAFqIAA2AgAPCyABIAMQTAsCQCACQQRqIgQoAgAiA0ECcQRAIAQgA0F+cTYCACABIABBAXI2AgQgACABaiAANgIADAELAkAgAkGApcAAKAIARwRAQfykwAAoAgAgAkYNASACIANBeHEiAhBMIAEgACACaiIAQQFyNgIEIAAgAWogADYCACABQfykwAAoAgBHDQJB9KTAACAANgIADwtBgKXAACABNgIAQfikwABB+KTAACgCACAAaiIANgIAIAEgAEEBcjYCBEH8pMAAKAIAIAFGB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ASEDIAAoAhggASACIAAoAhwoAgwRAwANACAEQQFqIQMgACgCHCEBIAAoAhghAANAIANBf2oiA0UEQEEADwsgACAFIAEoAhARAQBFDQALQQEPCyADDwsgACgCGCABIAIgAEEcaigCACgCDBEDAAvOBgEEfyMAQaABayICJAAgAkE6akIANwEAIAJBwgBqQQA7AQAgAkHEAGpCADcCACACQcwAakIANwIAIAJB1ABqQgA3AgAgAkHcAGpCADcCACACQQA7ATQgAkEANgE2IAJBMDYCMCACQZABaiACQdgAaikDADcDACACQYgBaiACQdAAaikDADcDACACQYABaiACQcgAaikDADcDACACQfgAaiACQUBrKQMANwMAIAJB8ABqIAJBOGopAwA3AwAgAkGYAWogAkHgAGooAgA2AgAgAiACKQMwNwNoIAJBIGogAkGMAWopAgA3AwAgAkEYaiACQYQBaikCADcDACACQRBqIAJB/ABqKQIANwMAIAJBCGogAkH0AGopAgA3AwAgAkEoaiACQZQBaikCADcDACACIAIpAmw3AwAgASACEB8gAUIANwMIIAFCADcDACABQQA2AlAgAUHQmMAAKQMANwMQIAFBGGpB2JjAACkDADcDACABQSBqQeCYwAApAwA3AwAgAUEoakHomMAAKQMANwMAIAFBMGpB8JjAACkDADcDACABQThqQfiYwAApAwA3AwAgAUFAa0GAmcAAKQMANwMAIAFByABqQYiZwAApAwA3AwACQAJAQTBBARChASIDBEAgAkIwNwJsIAIgAzYCaCACQegAaiACQTAQXgJAIAIoAmwiBCACKAJwIgNGBEAgBCEDDAELIAQgA0kNAiAERQ0AIAIoAmghBQJAIANFBEAgBRAQQQEhBAwBCyAFIARBASADEJoBIgRFDQQLIAIgAzYCbCACIAQ2AmgLIAIoAmghBCABQgA3AwggAUIANwMAIAFBADYCUCABQRBqIgFB0JjAACkDADcDACABQQhqQdiYwAApAwA3AwAgAUEQakHgmMAAKQMANwMAIAFBGGpB6JjAACkDADcDACABQSBqQfCYwAApAwA3AwAgAUEoakH4mMAAKQMANwMAIAFBMGpBgJnAACkDADcDACABQThqQYiZwAApAwA3AwAgAC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QeShwAAoAgAiA0EBIAJ0IgJxBEAgASgCCAwBC0HkocAAIAIgA3I2AgAgAQshAiABIAA2AgggAiAANgIMIAAgATYCDCAAIAI2AggL1AYBBH8jAEHQAWsiAiQAIAJBygBqQgA3AQAgAkHSAGpBADsBACACQdQAakIANwIAIAJB3ABqQgA3AgAgAkHkAGpCADcCACACQewAakIANwIAIAJB9ABqQgA3AgAgAkH8AGpBADoAACACQf0AakEANgAAIAJBgQFqQQA7AAAgAkGDAWpBADoAACACQQA7AUQgAkEANgFGIAJBwAA2AkAgAkGIAWogAkFAa0HEABCLARogAkE4aiACQcQBaikCADcDACACQTBqIAJBvAFqKQIANwMAIAJBKGogAkG0AWopAgA3AwAgAkEgaiACQawBaikCADcDACACQRhqIAJBpAFqKQIANwMAIAJBEGogAkGcAWopAgA3AwAgAkEIaiACQZQBaikCADcDACACIAIpAowBNwMAIAEgAhARIAFCADcDCCABQgA3AwAgAUEANgJQIAFBkJnAACkDADcDECABQRhqQZiZwAApAwA3AwAgAUEgakGgmcAAKQMANwMAIAFBKGpBqJnAACkDADcDACABQTBqQbCZwAApAwA3AwAgAUE4akG4mcAAKQMANwMAIAFBQGtBwJnAACkDADcDACABQcgAakHImcAAKQMANwMAAkACQEHAAEEBEKEBIgMEQCACQsAANwKMASACIAM2AogBIAJBiAFqIAJBwAAQXgJAIAIoAowBIgQgAigCkAEiA0YEQCAEIQMMAQsgBCADSQ0CIARFDQAgAigCiAEhBQJAIANFBEAgBRAQQQEhBAwBCyAFIARBASADEJoBIgRFDQQLIAIgAzYCjAEgAiAENgKIAQsgAigCiAEhBCABQgA3AwggAUIANwMAIAFBADYCUCABQRBqIgFBkJnAACkDADcDACABQQhqQZiZwAApAwA3AwAgAUEQakGgmcAAKQMANwMAIAFBGGpBqJnAACkDADcDACABQSBqQbCZwAApAwA3AwAgAUEoakG4mcAAKQMANwMAIAFBMGpBwJnAACkDADcDACABQThqQciZwAApAwA3AwAgACADNgIEIAAgBDYCACACQdABaiQADwtBwABBAUG0pcAAKAIAIgBBAiAAGxEAAAALQYeMwABBJEGsjMAAEIgBAAsgA0EBQbSlwAAoAgAiAEECIAAbEQAAAAuOBgEKfyMAQTBrIgIkACACQSRqQYCHwAA2AgAgAkEDOgAoIAJCgICAgIAENwMIIAIgADYCICACQQA2AhggAkEANgIQAn8CQAJAAkAgASgCCCIDBEAgASgCACEFIAEoAgQiCCABQQxqKAIAIgYgBiAISxsiBkUNASABQRRqKAIAIQcgASgCECEJIAAgBSgCACAFKAIEQYyHwAAoAgARAwANAyAFQQhqIQECQAJAA0AgAiADQQRqKAIANgIMIAIgA0Ecai0AADoAKCACIANBCGooAgA2AgggA0EYaigCACEAQQAhBAJAAkACQCADQRRqKAIAQQFrDgIAAgELIAAgB08NAyAAQQN0IAlqIgooAgRBA0cNASAKKAIAKAIAIQALQQEhBAsgAiAANgIUIAIgBDYCECADQRBqKAIAIQBBACEEAkACQAJAIANBDGooAgBBAWsOAgACAQsgACAHTw0EIABBA3QgCWoiCigCBEEDRw0BIAooAgAoAgAhAAtBASEECyACIAA2AhwgAiAENgIYIAMoAgAiACAHSQRAIAkgAEEDdGoiACgCACACQQhqIAAoAgQRAQANByALQQFqIgsgBk8NBiADQSBqIQMgAUEEaiEAIAEoAgAhBCABQQhqIQEgAigCICAEIAAoAgAgAigCJCgCDBEDAEUNAQwHCwsgACAHQaCLwAAQfAALIAAgB0GQi8AAEHwACyAAIAdBkIvAABB8AAsgASgCACEFIAEoAgQiCCABQRRqKAIAIgMgAyAISxsiBkUNACABKAIQIQMgACAFKAIAIAUoAgRBjIfAACgCABEDAA0CIAVBCGohAUEAIQADQCADKAIAIAJBCGogA0EEaigCABEBAA0DIABBAWoiACAGTw0CIANBCGohAyABQQRqIQcgASgCACEEIAFBCGohASACKAIgIAQgBygCACACKAIkKAIMEQMARQ0ACwwCC0EAIQYLIAggBksEQCACKAIgIAUgBkEDdGoiACgCACAAKAIEIAIoAiQoAgwRAwANAQtBAAwBC0EBCyACQTBqJAALwQU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AGopAgA3AwAgAkEoaiACQYQBaikCADcDACACIAIpAmQ3AwggASACQQhqEE0gAUIANwMAIAFBADYCMCABQdCXwAApAwA3AwggAUEQakHYl8AAKQMANwMAIAFBGGpB4JfAACkDADcDACABQSBqQeiXwAApAwA3AwAgAUEoakHwl8AAKQMANwMAAkACQEEoQQEQoQEiAwRAIAJCKDcCZCACIAM2AmAgAkHgAGogAkEIakEoEF4CQCACKAJkIgQgAigCaCIDRgRAIAQhAwwBCyAEIANJDQIgBEUNACACKAJgIQUCQCADRQRAIAUQEEEBIQQMAQsgBSAEQQEgAxCaASIERQ0ECyACIAM2AmQgAiAENgJgCyACKAJgIQQgAUIANwMAIAFBADYCMCABQQhqIgFB0JfAACkDADcDACABQQhqQdiXwAApAwA3AwAgAUEQakHgl8AAKQMANwMAIAFBGGpB6JfAACkDADcDACABQSBqQfCXwAApAwA3AwAgACADNgIEIAAgBDYCACACQZABaiQADwtBKEEBQbSlwAAoAgAiAEECIAAbEQAAAAtBh4zAAEEkQayMwAAQiAEACyADQQFBtKXAACgCACIAQQIgABsRAAAAC8YEAQR/IwBBoAFrIgIkACACQTpqQgA3AQAgAkHCAGpBADsBACACQcQAakIANwIAIAJBzABqQgA3AgAgAkHUAGpCADcCACACQdwAakIANwIAIAJBADsBNCACQQA2ATYgAkEwNgIwIAJBkAFqIAJB2ABqKQMANwMAIAJBiAFqIAJB0ABqKQMANwMAIAJBgAFqIAJByABqKQMANwMAIAJB+ABqIAJBQGspAwA3AwAgAkHwAGogAkE4aikDADcDACACQZgBaiACQeAAaigCADYCACACIAIpAzA3A2ggAkEgaiACQYwBaikCADcDACACQRhqIAJBhAFqKQIANwMAIAJBEGogAkH8AGopAgA3AwAgAkEIaiACQfQAaikCADcDACACQShqIAJBlAFqKQIANwMAIAIgAikCbDcDACABIAIQYyABQQBByAEQkQEiBUEANgLIAQJAAkBBMEEBEKEBIgEEQCACQjA3AmwgAiABNgJoIAJB6ABqIAJBMBBeAkAgAigCbCIDIAIoAnA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ACACQYwDakIANwIAIAJBlANqQgA3AgAgAkEAOwHsAiACQQA2Ae4CIAJBMDYC6AIgAkHYAGogAkGQA2opAwA3AwAgAkHQAGogAkGIA2opAwA3AwAgAkHIAGogAkGAA2opAwA3AwAgAkFAayACQfgCaikDADcDACACQThqIAJB8AJqKQMANwMAIAJB4ABqIAJBmANqKAIANgIAIAIgAikD6AI3AzAgAkEgaiACQdQAaikCADcDACACQRhqIAJBzABqKQIANwMAIAJBEGogAkHEAGopAgA3AwAgAkEIaiACQTxqKQIANwMAIAJBKGogAkHcAGopAgA3AwAgAiACKQI0NwMAIAJBMGogAUG4AhCLARogAkEwaiACEGMCQAJAQTBBARChASIDBEAgAkIwNwI0IAIgAzYCMCACQTBqIAJBMBBeAkAgAigCNCIEIAIoAjgiA0YEQCAEIQMMAQsgBCADSQ0CIARFDQAgAigCMCEFAkAgA0UEQCAFEBBBASEEDAELIAUgBEEBIAMQmgEiBEUNBAsgAiADNgI0IAIgBDYCMAsgAigCMCEEIAEQECAAIAM2AgQgACAENgIAIAJBoANqJAAPC0EwQQFBtKXAACgCACIAQQIgABsRAAAAC0GHjMAAQSRBrIzAABCIAQALIANBAUG0pcAAKAIAIgBBAiAAGxEAAAALvAQBBH8jAEGgA2siAiQAIAJB8gJqQgA3AQAgAkH6AmpBADsBACACQfwCakIANwIAIAJBhANqQgA3AgAgAkGMA2pCADcCACACQZQDakIANwIAIAJBADsB7AIgAkEANgHuAiACQTA2AugCIAJB2ABqIAJBkANqKQMANwMAIAJB0ABqIAJBiANqKQMANwMAIAJByABqIAJBgANqKQMANwMAIAJBQGsgAkH4AmopAwA3AwAgAkE4aiACQfACaikDADcDACACQeAAaiACQZgDaigCADYCACACIAIpA+gCNwMwIAJBIGogAkHUAGopAgA3AwAgAkEYaiACQcwAaikCADcDACACQRBqIAJBxABqKQIANwMAIAJBCGogAkE8aikCADcDACACQShqIAJB3ABqKQIANwMAIAIgAikCNDcDACACQTBqIAFBuAIQiwEaIAJBMGogAhBkAk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QIANwIAIAFBCGpBtJjAACkCADcCACABQRBqQbyYwAApAgA3AgAgAUEYakHEmMAAKQIANwIAIAAgAzYCBCAAIAQ2AgAgAkHwAGokAA8LQSBBAUG0pcAAKAIAIgBBAiAAGxEAAAALQYeMwABBJEGsjMAAEIgBAAsgA0EBQbSlwAAoAgAiAEECIAAbEQAAAAvMBAEEfyMAQdABayICJAAgAkHKAGpCADcBACACQdIAakEAOwEAIAJB1ABqQgA3AgAgAkHcAGpCADcCACACQeQAakIANwIAIAJB7ABqQgA3AgAgAkH0AGpCADcCACACQfwAakEAOgAAIAJB/QBqQQA2AAAgAkGBAWpBADsAACACQYMBakEAOgAAIAJBADsBRCACQQA2AUYgAkHAADYCQCACQYgBaiACQUBrQcQAEIsBGiACQThqIAJBxAFqKQIANwMAIAJBMGogAkG8AWopAgA3AwAgAkEoaiACQbQBaikCADcDACACQSBqIAJBrAFqKQIANwMAIAJBGGogAkGkAWopAgA3AwAgAkEQaiACQZwBaikCADcDACACQQhqIAJBlAFqKQIANwMAIAIgAikCjAE3AwAgASACEFsgAUEAQcgBEJEBIgVBADYCyAECQAJAQcAAQQEQoQEiAQRAIAJCwAA3AowBIAIgATYCiAEgAkGIAWogAkHAABBeAkAgAigCjAEiAyACKAKQASIBRgRAIAMhAQwBCyADIAFJDQIgA0UNACACKAKIASEEAkAgAUUEQCAEEBBBASEDDAELIAQgA0EBIAEQmgEiA0UNBAsgAiABNgKMASACIAM2AogBCyACKAKIASEDIAVBAEHIARCRAUEANgLIASAAIAE2AgQgACADNgIAIAJB0AFqJAAPC0HAAEEBQbSlwAAoAgAiAEECIAAbEQAAAAtBh4zAAEEkQayMwAAQiAEACyABQQFBtKXAACgCACIAQQIgABsRAAAAC8wEAQR/IwBB0AFrIgIkACACQcoAakIANwEAIAJB0gBqQQA7AQAgAkHUAGpCADcCACACQdwAakIANwIAIAJB5ABqQgA3AgAgAkHsAGpCADcCACACQfQAakIANwIAIAJB/ABqQQA6AAAgAkH9AGpBADYAACACQYEBakEAOwAAIAJBgwFqQQA6AAAgAkEAOwFEIAJBADYBRiACQcAANgJAIAJBiAFqIAJBQGtBxAAQiwEaIAJBOGogAkHEAWopAgA3AwAgAkEwaiACQbwBaikCADcDACACQShqIAJBtAFqKQIANwMAIAJBIGogAkGsAWopAgA3AwAgAkEYaiACQaQBaikCADcDACACQRBqIAJBnAFqKQIANwMAIAJBCGogAkGUAWopAgA3AwAgAiACKQKMATcDACABIAIQXCABQQBByAEQkQEiBUEANgLIAQJAAkBBwABBARChASIBBEAgAkLAADcCjAEgAiABNgKIASACQYgBaiACQcAAEF4CQCACKAKMASIDIAIoApABIgFGBEAgAyEBDAELIAMgAUkNAiADRQ0AIAIoAogBIQQCQCABRQRAIAQQEEEBIQMMAQsgBCADQQEgARCaASIDRQ0ECyACIAE2AowBIAIgAzYCiAELIAIoAogBIQMgBUEAQcgBEJEBQQA2AsgBIAAgATYCBCAAIAM2AgAgAkHQAWokAA8LQcAAQQFBtKXAACgCACIAQQIgABsRAAAAC0GHjMAAQSRBrIzAABCIAQALIAFBAUG0pcAAKAIAIgBBAiAAGxEAAAALuAQBBH8jAEGgA2siAiQAIAJB4gJqQgA3AQAgAkHqAmpBADsBACACQewCakIANwIAIAJB9AJqQgA3AgAgAkH8AmpCADcCACACQYQDakIANwIAIAJBjANqQgA3AgAgAkGUA2pBADoAACACQZUDakEANgAAIAJBmQNqQQA7AAAgAkGbA2pBADoAACACQQA7AdwCIAJBADYB3gIgAkHAADYC2AIgAkFAayACQdgCakHEABCLARogAkE4aiACQfwAaikCADcDACACQTBqIAJB9ABqKQIANwMAIAJBKGogAkHsAGopAgA3AwAgAkEgaiACQeQAaikCADcDACACQRhqIAJB3ABqKQIANwMAIAJBEGogAkHUAGopAgA3AwAgAkEIaiACQcwAaikCADcDACACIAIpAkQ3AwAgAkFAayABQZgCEIsBGiACQUBrIAIQWwJAAkBBwABBARChASIDBEAgAkLAADcCRCACIAM2AkAgAkFAayACQcAAEF4CQCACKAJEIgQgAigCSCIDRgRAIAQhAwwBCyAEIANJDQIgBEUNACACKAJAIQUCQCADRQRAIAUQEEEBIQQMAQsgBSAEQQEgAxCaASIERQ0ECyACIAM2AkQgAiAENgJACyACKAJAIQQgARAQIAAgAzYCBCAAIAQ2AgAgAkGgA2okAA8LQcAAQQFBtKXAACgCACIAQQIgABsRAAAAC0GHjMAAQSRBrIzAABCIAQALIANBAUG0pcAAKAIAIgBBAiAAGxEAAAALuAQBBH8jAEGgA2siAiQAIAJB4gJqQgA3AQAgAkHqAmpBADsBACACQewCakIANwIAIAJB9AJqQgA3AgAgAkH8AmpCADcCACACQYQDakIANwIAIAJBjANqQgA3AgAgAkGUA2pBADoAACACQZUDakEANgAAIAJBmQNqQQA7AAAgAkGbA2pBADoAACACQQA7AdwCIAJBADYB3gIgAkHAADYC2AIgAkFAayACQdgCakHEABCLARogAkE4aiACQfwAaikCADcDACACQTBqIAJB9ABqKQIANwMAIAJBKGogAkHsAGopAgA3AwAgAkEgaiACQeQAaikCADcDACACQRhqIAJB3ABqKQIANwMAIAJBEGogAkHUAGopAgA3AwAgAkEIaiACQcwAaikCADcDACACIAIpAkQ3AwAgAkFAayABQZgCEIsBGiACQUBrIAIQXAJAAkBBwABBARChASIDBEAgAkLAADcCRCACIAM2AkAgAkFAayACQcAAEF4CQCACKAJEIgQgAigCSCIDRgRAIAQhAwwBCyAEIANJDQIgBEUNACACKAJAIQUCQCADRQRAIAUQEEEBIQQMAQsgBSAEQQEgAxCaASIERQ0ECyACIAM2AkQgAiAENgJACyACKAJAIQQgARAQIAAgAzYCBCAAIAQ2AgAgAkGgA2okAA8LQcAAQQFBtKXAACgCACIAQQIgABsRAAAAC0GHjMAAQSRBrIzAABCIAQALIANBAUG0pcAAKAIAIgBBAiAAGxEAAAALuAQBBH8jAEHgAmsiAiQAIAJBogJqQgA3AQAgAkGqAmpBADsBACACQawCakIANwIAIAJBtAJqQgA3AgAgAkG8AmpCADcCACACQcQCakIANwIAIAJBzAJqQgA3AgAgAkHUAmpBADoAACACQdUCakEANgAAIAJB2QJqQQA7AAAgAkHbAmpBADoAACACQQA7AZwCIAJBADYBngIgAkHAADYCmAIgAkFAayACQZgCakHEABCLARogAkE4aiACQfwAaikCADcDACACQTBqIAJB9ABqKQIANwMAIAJBKGogAkHsAGopAgA3AwAgAkEgaiACQeQAaikCADcDACACQRhqIAJB3ABqKQIANwMAIAJBEGogAkHUAGopAgA3AwAgAkEIaiACQcwAaikCADcDACACIAIpAkQ3AwAgAkFAayABQdgBEIsBGiACQUBrIAIQEQJAAkBBwABBARChASIDBEAgAkLAADcCRCACIAM2AkAgAkFAayACQcAAEF4CQCACKAJEIgQgAigCSCIDRgRAIAQhAwwBCyAEIANJDQIgBEUNACACKAJAIQUCQCADRQRAIAUQEEEBIQQMAQsgBSAEQQEgAxCaASIERQ0ECyACIAM2AkQgAiAENgJACyACKAJAIQQgARAQIAAgAzYCBCAAIAQ2AgAgAkHgAmokAA8LQcAAQQFBtKXAACgCACIAQQIgABsRAAAAC0GHjMAAQSRBrIzAABCIAQALIANBAUG0pcAAKAIAIgBBAiAAGxEAAAAL0AQBBH8jAEHgAGsiAiQAIAJBKmpCADcBACACQTJqQQA7AQAgAkE0akIANwIAIAJBHDYCICACQTxqQQA2AgAgAkEAOwEkIAJBADYBJiACQdgAaiACQThqKQMANwMAIAJB0ABqIAJBMGopAwA3AwAgAkHIAGogAkEoaikDADcDACACIAIpAyA3A0AgAkEYaiACQdwAaigCADYCACACQRBqIAJB1ABqKQIANwMAIAJBCGogAkHMAGopAgA3AwAgAiACKQJENwMAIAEgAhBPIAFBADYCCCABQgA3AwAgAUGMmMAAKQIANwJMIAFB1ABqQZSYwAApAgA3AgAgAUHcAGpBnJjAACkCADcCACABQeQAakGkmMAAKQIANwIAAkACQEEcQQEQoQEiAwRAIAJCHDcCRCACIAM2AkAgAkFAayACQRwQXgJAIAIoAkQiBCACKAJIIgNGBEAgBCEDDAELIAQgA0kNAiAERQ0AIAIoAkAhBQJAIANFBEAgBRAQQQEhBAwBCyAFIARBASADEJoBIgRFDQQLIAIgAzYCRCACIAQ2AkALIAIoAkAhBCABQQA2AgggAUIANwMAIAFBzABqIgFBjJjAACkCADcCACABQQhqQZSYwAApAgA3AgAgAUEQakGcmMAAKQIANwIAIAFBGGpBpJjAACkCADcCACAAIAM2AgQgACAENgIAIAJB4ABqJAAPC0EcQQFBtKXAACgCACIAQQIgABsRAAAAC0GHjMAAQSRBrIzAABCIAQALIANBAUG0pcAAKAIAIgBBAiAAGxEAAAALjAQBBH8jAEHQAWsiAiQAIAJBqgFqQgA3AQAgAkGyAWpBADsBACACQbQBakIANwIAIAJBvAFqQgA3AgAgAkHEAWpCADcCACACQQA7AaQBIAJBADYBpgEgAkEoNgKgASACQcgAaiACQcABaikDADcDACACQUBrIAJBuAFqKQMANwMAIAJBOGogAkGwAWopAwA3AwAgAkEwaiACQagBaikDADcDACACQdAAaiACQcgBaigCADYCACACIAIpA6ABNwMoIAJBGGogAkHEAGopAgA3AwAgAkEQaiACQTxqKQIANwMAIAJBCGogAkE0aikCADcDACACQSBqIAJBzABqKQIANwMAIAIgAikCLDcDACACQShqIAFB+AAQiwEaIAJBKGogAhBNAkACQEEoQQEQoQEiAwRAIAJCKDcCLCACIAM2AiggAkEoaiACQSgQXgJAIAIoAiwiBCACKAIwIgNGBEAgBCEDDAELIAQgA0kNAiAERQ0AIAIoAighBQJAIANFBEAgBRAQQQEhBAwBCyAFIARBASADEJoBIgRFDQQLIAIgAzYCLCACIAQ2AigLIAIoAighBCABEBAgACADNgIEIAAgBDYCACACQdABaiQADwtBKEEBQbSlwAAoAgAiAEECIAAbEQAAAAtBh4zAAEEkQayMwAAQiAEACyADQQFBtKXAACgCACIAQQIgABsRAAAAC5sEAQd/IwBBQGoiAyQAAkACQAJAAkACQAJAAkBBiAEgACgCyAEiBGsiBiACTQRAIAQEQCAEQYkBTw0GIAAgBGpBzAFqIAEgBhCLARogAiAGayECIAEgBmohAQNAIAAgBWoiBCAELQAAIARBzAFq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AABB9AAsgBEGQAUHQm8AAEH4ACyAEIAJB4JvAABB9AAsgA0E0akEGNgIAIANBJGpBAjYCACADQgM3AhQgA0G4nsAANgIQIANBBjYCLCADIANBDGo2AjggA0G0nsAANgI8IAMgA0EoajYCICADIANBPGo2AjAgAyADQThqNgIoIANBEGpB4J7AABCQAQALmwQBB38jAEFAaiIDJAACQAJAAkACQAJAAkACQEHIACAAKALIASIEayIGIAJNBEAgBARAIARByQBPDQYgACAEakHMAWogASAGEIsBGiACIAZrIQIgASAGaiEBA0AgACAFaiIEIAQtAAAgBEHMAWotAABzOgAAIAVBAWoiBUHIAEcNAAsgABAOCyACIAJByABwIgdrIQQgAiAHSQ0GIARByABJDQEgAUHIAGohCCABIQIgBCEGQcgAIQUDQCADIAU2AgwgBUHIAEcNCCAGQbh/aiEGQQAhBQNAIAAgBWoiCSAJLQAAIAIgBWotAABzOgAAIAVBAWoiBUHIAEcNAAsgABAOIAZByABJDQJByAAhBSACQcgAaiECIAhByABqIQgMAAsACyACIARqIgYgBEkNAiAGQcgASw0DIAAgBGpBzAFqIAEgAhCLARogACgCyAEgAmohBwwBCyAAQcwBaiABIARqIAcQiwEaCyAAIAc2AsgBIANBQGskAA8LIAQgBkHAm8AAEH4ACyAGQcgAQcCbwAAQfQALIARByABB0JvAABB+AAsgBCACQeCbwAAQfQALIANBNGpBBjYCACADQSRqQQI2AgAgA0IDNwIUIANBuJ7AADYCECADQQY2AiwgAyADQQxqNgI4IANB3J7AADYCPCADIANBKGo2AiAgAyADQTxqNgIwIAMgA0E4ajYCKCADQRBqQeCewAAQkAEAC5sEAQd/IwBBQGoiAyQAAkACQAJAAkACQAJAAkBB6AAgACgCyAEiBGsiBiACTQRAIAQEQCAEQekATw0GIAAgBGpBzAFqIAEgBhCLARogAiAGayECIAEgBmohAQNAIAAgBWoiBCAELQAAIARBzAFqLQAAczoAACAFQQFqIgVB6ABHDQALIAAQDgsgAiACQegAcCIHayEEIAIgB0kNBiAEQegASQ0BIAFB6ABq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AiAEECIAAbEQAAAAuOBAEFfyMAQYABayICJAAgAkHyAGpCADcBACACQfoAakEAOwEAIAJBADsBbCACQQA2AW4gAkEQNgJoIAJBGGogAkHwAGoiBCkDADcDACACQSBqIAJB+ABqKAIANgIAIAJBCGoiBSACQRxqKQIANwMAIAIgAikDaDcDECACIAIpAhQ3AwAgAkEQaiABQdQAEIsBGgJAAkACQCACKAIQIgNBEEkEQCACQRBqQQRyIgYgA2pBECADayIDIAMQkQEaIAJBADYCECACQSRqIgMgBhALIAQgAkHcAGopAgA3AwAgAiACQdQAaikCADcDaCADIAJB6ABqEAsgBSACQSxqKQIANwMAIAIgAikCJDcDAEEQQQEQoQEiA0UNASACQhA3AhQgAiADNgIQIAJBEGogAkEQEF4CQCACKAIUIgQgAigCGCIDRgRAIAQhAwwBCyAEIANJDQMgBEUNACACKAIQIQUCQCADRQRAIAUQEEEBIQQMAQsgBSAEQQEgAxCaASIERQ0FCyACIAM2AhQgAiAENgIQCyACKAIQIQQgARAQIAAgAzYCBCAAIAQ2AgAgAkGAAWokAA8LQbCawABBFyACQegAakGgl8AAQbCXwAAQeQALQRBBAUG0pcAAKAIAIgBBAiAAGxEAAAALQYeMwABBJEGsjMAAEIgBAAsgA0EBQbSlwAAoAgAiAEECIAAbEQAAAAuFBAEEfyMAQdAAayICJAAgAkEqakIANwEAIAJBMmpBADsBACACQRQ2AiAgAkE0akEANgIAIAJBADsBJCACQQA2ASYgAkHIAGogAkEwaikDADcDACACQUBrIAJBKGopAwA3AwAgAkEQaiACQcQAaikCADcDACACQRhqIAJBzABqKAIANgIAIAIgAikDIDcDOCACIAIpAjw3AwggASACQQhqEFogAUIANwMAIAFBADYCHCABQfiXwAApAwA3AwggAUEQakGAmMAAKQMANwMAIAFBGGpBiJjAACgCADYCAAJAAkBBFEEBEKEBIgMEQCACQhQ3AjwgAiADNgI4IAJBOGogAkEIakEUEF4CQCACKAI8IgQgAigCQCIDRgRAIAQhAwwBCyAEIANJDQIgBEUNACACKAI4IQ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dAAaiACQShqKQMANwMAIAJB6ABqIAJBQGsoAgA2AgAgAiACKQMgNwNIIAJBEGogAkHcAGopAgA3AwAgAkEIaiACQdQAaikCADcDACACQRhqIAJB5ABqKQIANwMAIAIgAikCTDcDACABIAIQZiABQQBByAEQkQEiBUEANgLIAQJAAkBBIEEBEKEBIgEEQCACQiA3AkwgAiABNgJIIAJByABqIAJBIBBeAkAgAigCTCIDIAIoAlAiAUYEQCADIQEMAQsgAyABSQ0CIANFDQAgAigCSCEEAkAgAUUEQCAEEBBBASEDDAELIAQgA0EBIAEQmgEiA0UNBAsgAiABNgJMIAIgAzYCSAsgAigCSCEDIAVBAEHIARCRAUEANgLIASAAIAE2AgQgACADNgIAIAJB8ABqJAAPC0EgQQFBtKXAACgCACIAQQIgABsRAAAAC0GHjMAAQSRBrIzAABCIAQALIAFBAUG0pcAAKAIAIgBBAiAAGxEAAAAL5QMBBH8jAEHwAGsiAiQAIAJBKmpCADcBACACQTJqQQA7AQAgAkE0akIANwIAIAJBPGpCADcCACACQQA7ASQgAkEANgEmIAJBIDYCICACQeAAaiACQThqKQMANwMAIAJB2ABqIAJBMGopAwA3AwAgAkHQAGogAkEoaikDADcDACACQegAaiACQUBrKAIANgIAIAIgAikDIDcDSCACQRBqIAJB3ABqKQIANwMAIAJBCGogAkHUAGopAgA3AwAgAkEYaiACQeQAaikCADcDACACIAIpAkw3AwAgASACEGcgAUEAQcgBEJEBIgVBADYCyAECQAJAQSBBARChASIBBEAgAkIgNwJMIAIgATYCSCACQcgAaiACQSAQXgJAIAIoAkwiAyACKAJQIgFGBEAgAyEBDAELIAMgAUkNAiADRQ0AIAIoAkghBAJAIAFFBEAgBBAQQQEhAwwBCyAEIANBASABEJoBIgNFDQQLIAIgATYCTCACIAM2AkgLIAIoAkghAyAFQQBByAEQkQFBADYCyAEgACABNgIEIAAgAzYCACACQfAAaiQADwtBIEEBQbSlwAAoAgAiAEECIAAbEQAAAAtBh4zAAEEkQayMwAAQiAEACyABQQFBtKXAACgCACIAQQIgABsRAAAAC9wDAQR/IwBBoANrIgIkACACQYIDakIANwEAIAJBigNqQQA7AQAgAkGMA2pCADcCACACQZQDakIANwIAIAJBADsB/AIgAkEANgH+AiACQSA2AvgCIAJBOGogAkGQA2opAwA3AwAgAkEwaiACQYgDaikDADcDACACQShqIAJBgANqKQMANwMAIAJBQGsgAkGYA2ooAgA2AgAgAiACKQP4AjcDICACQRBqIAJBNGopAgA3AwAgAkEIaiACQSxqKQIANwMAIAJBGGogAkE8aikCADcDACACIAIpAiQ3AwAgAkEgaiABQdgCEIsBGiACQSBqIAIQZgJAAkBBIEEBEKEBIgMEQCACQiA3AiQgAiADNgIgIAJBIGogAkEgEF4CQCACKAIkIgQgAigCKCIDRgRAIAQhAwwBCyAEIANJDQIgBEUNACACKAIgIQUCQCADRQRAIAUQEEEBIQQMAQsgBSAEQQEgAxCaASIERQ0ECyACIAM2AiQgAiAENgIgCyACKAIgIQQgARAQIAAgAzYCBCAAIAQ2AgAgAkGgA2okAA8LQSBBAUG0pcAAKAIAIgBBAiAAGxEAAAALQYeMwABBJEGsjMAAEIgBAAsgA0EBQbSlwAAoAgAiAEECIAAbEQAAAAvcAwEEfyMAQaADayICJAAgAkGCA2pCADcBACACQYoDakEAOwEAIAJBjANqQgA3AgAgAkGUA2pCADcCACACQQA7AfwCIAJBADYB/gIgAkEgNgL4AiACQThqIAJBkANqKQMANwMAIAJBMGogAkGIA2opAwA3AwAgAkEoaiACQYADaikDADcDACACQUBrIAJBmANqKAIANgIAIAIgAikD+AI3AyAgAkEQaiACQTRqKQIANwMAIAJBCGogAkEsaikCADcDACACQRhqIAJBPGopAgA3AwAgAiACKQIkNwMAIAJBIGogAUHYAhCLARogAkEgaiACEGcCQAJAQSBBARChASIDBEAgAkIgNwIkIAIgAzYCICACQSBqIAJBIBBeAkAgAigCJCIEIAIoAigiA0YEQCAEIQMMAQsgBCADSQ0CIARFDQAgAigCICEFAkAgA0UEQCAFEBBBASEEDAELIAUgBEEBIAMQmgEiBEUNBAsgAiADNgIkIAIgBDYCIAsgAigCICEEIAEQECAAIAM2AgQgACAENgIAIAJBoANqJAAPC0EgQQFBtKXAACgCACIAQQIgABsRAAAAC0GHjMAAQSRBrIzAABCIAQALIANBAUG0pcAAKAIAIgBBAiAAGxEAAAAL0wMBBH8jAEHgAGsiAiQAIAJBKmpCADcBACACQTJqQQA7AQAgAkE0akIANwIAIAJBHDYCICACQTxqQQA2AgAgAkEAOwEkIAJBADYBJiACQdgAaiACQThqKQMANwMAIAJB0ABqIAJBMGopAwA3AwAgAkHIAGogAkEoaikDADcDACACIAIpAyA3A0AgAkEYaiACQdwAaigCADYCACACQRBqIAJB1ABqKQIANwMAIAJBCGogAkHMAGopAgA3AwAgAiACKQJENwMAIAEgAhBoIAFBAEHIARCRASIFQQA2AsgBAkACQEEcQQEQoQEiAQRAIAJCHDcCRCACIAE2AkAgAkFAayACQRwQXgJAIAIoAkQiAyACKAJIIgFGBEAgAyEBDAELIAMgAUkNAiADRQ0AIAIoAkAhBAJAIAFFBEAgBBAQQQEhAwwBCyAEIANBASABEJoBIgNFDQQLIAIgATYCRCACIAM2AkALIAIoAkAhAyAFQQBByAEQkQFBADYCyAEgACABNgIEIAAgAzYCACACQeAAaiQADwtBHEEBQbSlwAAoAgAiAEECIAAbEQAAAAtBh4zAAEEkQayMwAAQiAEACyABQQFBtKXAACgCACIAQQIgABsRAAAAC9MDAQR/IwBB4ABrIgIkACACQSpqQgA3AQAgAkEyakEAOwEAIAJBNGpCADcCACACQRw2AiAgAkE8akEANgIAIAJBADsBJCACQQA2ASYgAkHYAGogAkE4aikDADcDACACQdAAaiACQTBqKQMANwMAIAJByABqIAJBKGopAwA3AwAgAiACKQMgNwNAIAJBGGogAkHcAGooAgA2AgAgAkEQaiACQdQAaikCADcDACACQQhqIAJBzABqKQIANwMAIAIgAikCRDcDACABIAIQaSABQQBByAEQkQEiBUEANgLIAQJAAkBBHEEBEKEBIgEEQCACQhw3AkQgAiABNgJAIAJBQGsgAkEcEF4CQCACKAJEIgMgAigCSCIBRgRAIAMhAQwBCyADIAFJDQIgA0UNACACKAJAIQQCQCABRQRAIAQQEEEBIQMMAQsgBCADQQEgARCaASIDRQ0ECyACIAE2AkQgAiADNgJACyACKAJAIQMgBUEAQcgBEJEBQQA2AsgBIAAgATYCBCAAIAM2AgAgAkHgAGokAA8LQRxBAUG0pcAAKAIAIgBBAiAAGxEAAAALQYeMwABBJEGsjMAAEIgBAAsgAUEBQbSlwAAoAgAiAEECIAAbEQAAAAvkAwIJfwF+IwBBoAFrIgIkACACQUBrIAFBBGoQciABKAIAIQggAkH4AGoiAyABQTxqKQAANwMAIAJB8ABqIgQgAUE0aikAADcDACACQegAaiIFIAFBLGopAAA3AwAgAkHgAGoiBiABQSRqKQAANwMAIAJB2ABqIgcgAUEcaikAADcDACACIAEpABQ3A1AgAkGQAWogAUHEAGoQciACQQhqIgkgBykDADcDACACQRBqIgcgBikDADcDACACQRhqIgYgBSkDADcDACACQSBqIgUgBCkDADcDACACQShqIgQgAykDADcDACACQTBqIgMgAikDkAEiCzcDACACQThqIgogAkGYAWopAwA3AwAgAiALNwOAASACIAIpA1A3AwBB1ABBBBChASIBRQRAQdQAQQRBtKXAACgCACIAQQIgABsRAAAACyABIAg2AgAgASACKQNANwIEIAEgAikDADcCFCABQQxqIAJByABqKQMANwIAIAFBHGogCSkDADcCACABQSRqIAcpAwA3AgAgAUEsaiAGKQMANwIAIAFBNGogBSkDADcCACABQTxqIAQpAwA3AgAgAUHEAGogAykDADcCACABQcwAaiAKKQMANwIAIABB9I/AADYCBCAAIAE2AgAgAkGgAWokAAvLAwEEfyMAQaADayICJAAgAkGKA2pCADcBACACQZIDakEAOwEAIAJBlANqQgA3AgAgAkEcNgKAAyACQZwDakEANgIAIAJBADsBhAMgAkEANgGGAyACQThqIAJBmANqKQMANwMAIAJBMGogAkGQA2opAwA3AwAgAkEoaiACQYgDaikDADcDACACIAIpA4ADNwMgIAJBGGogAkE8aigCADYCACACQRBqIAJBNGopAgA3AwAgAkEIaiACQSxqKQIANwMAIAIgAikCJDcDACACQSBqIAFB4AIQiwEaIAJBIGogAhBpAkACQEEcQQEQoQEiAwRAIAJCHDcCJCACIAM2AiAgAkEgaiACQRwQXgJAIAIoAiQiBCACKAIoIgNGBEAgBCEDDAELIAQgA0kNAiAERQ0AIAIoAiAhBQJAIANFBEAgBRAQQQEhBAwBCyAFIARBASADEJoBIgRFDQQLIAIgAzYCJCACIAQ2AiALIAIoAiAhBCABEBAgACADNgIEIAAgBDYCACACQaADaiQADwtBHEEBQbSlwAAoAgAiAEECIAAbEQAAAAtBh4zAAEEkQayMwAAQiAEACyADQQFBtKXAACgCACIAQQIgABsRAAAAC8sDAQR/IwBBoANrIgIkACACQYoDakIANwEAIAJBkgNqQQA7AQAgAkGUA2pCADcCACACQRw2AoADIAJBnANqQQA2AgAgAkEAOwGEAyACQQA2AYYDIAJBOGogAkGYA2opAwA3AwAgAkEwaiACQZADaikDADcDACACQShqIAJBiANqKQMANwMAIAIgAikDgAM3AyAgAkEYaiACQTxqKAIANgIAIAJBEGogAkE0aikCADcDACACQQhqIAJBLGopAgA3AwAgAiACKQIkNwMAIAJBIGogAUHgAhCLARogAkEgaiACEGgCQAJAQRxBARChASIDBEAgAkIcNwIkIAIgAzYCICACQSBqIAJBHBBeAkAgAigCJCIEIAIoAigiA0YEQCAEIQMMAQsgBCADSQ0CIARFDQAgAigCICEFAkAgA0UEQCAFEBBBASEEDAELIAUgBEEBIAMQmgEiBEUNBAsgAiADNgIkIAIgBDYCIAsgAigCICEEIAEQECAAIAM2AgQgACAENgIAIAJBoANqJAAPC0EcQQFBtKXAACgCACIAQQIgABsRAAAAC0GHjMAAQSRBrIzAABCIAQALIANBAUG0pcAAKAIAIgBBAiAAGxEAAAALywMBBH8jAEGwAWsiAiQAIAJBmgFqQgA3AQAgAkGiAWpBADsBACACQaQBakIANwIAIAJBHDYCkAEgAkGsAWpBADYCACACQQA7AZQBIAJBADYBlgEgAkE4aiACQ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MgA0E4ajYCKCADQRBqQeCewAAQkAEAC7MDAQZ/IwBBQGoiAyQAIAAgACkDACACrXw3AwACQAJAAkACQAJAAkBBwAAgACgCHCIEayIFIAJNBEAgAEEIaiEHIAQEQCAEQcEATw0GIAQgAEEgaiIEaiABIAUQiwEaIAcgBBAHIAIgBWshAiABIAVqIQELIAJBP3EhBSACQUBxIghBwABJDQEgAiAFa0FAaiEGIAEhBEHAACECA0AgAyACNgIMIAJBwABHDQcgByAEEAcgBkHAAEkNAiAEQUBrIQQgBkFAaiEGDAALAAsgAiAEaiIFIARJDQIgBUHAAEsNAyAAIARqQSBqIAEgAhCLARogACgCHCACaiEFDAELIABBIGogASAIaiAFEIsBGgsgACAFNgIcIANBQGskAA8LIAQgBUHAm8AAEH4ACyAFQcAAQcCbwAAQfQALIARBwABB0JvAABB+AAsgA0E0akEGNgIAIANBJGpBAjYCACADQgM3AhQgA0G4nsAANgIQIANBBjYCLCADIANBDGo2AjggA0GsjcAANgI8IAMgA0EoajYCICADIANBPGo2AjAgAyADQThqNgIoIANBEGpB4J7AABCQAQALtAMBBn8jAEFAaiIDJAAgACAAKQMAIAKtfDcDAAJAAkACQAJAAkACQEHAACAAKAIIIgRrIgUgAk0EQCAAQcwAaiEHIAQEQCAEQcEATw0GIAQgAEEMaiIEaiABIAUQiwEaIAcgBBAKIAIgBWshAiABIAVqIQELIAJBP3EhBSACQUBxIghBwABJDQEgAiAFa0FAaiEGIAEhBEHAACECA0AgAyACNgIMIAJBwABHDQcgByAEEAogBkHAAEkNAiAEQUBrIQQgBkFAaiEGDAALAAsgAiAEaiIFIARJDQIgBUHAAEsNAyAAIARqQQxqIAEgAhCLARogACgCCCACaiEFDAELIABBDGogASAIaiAFEIsBGgsgACAFNgIIIANBQGskAA8LIAQgBUHAm8AAEH4ACyAFQcAAQcCbwAAQfQALIARBwABB0JvAABB+AAsgA0E0akEGNgIAIANBJGpBAjYCACADQgM3AhQgA0G4nsAANgIQIANBBjYCLCADIANBDGo2AjggA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BEAgBRAQQQEhBAwBCyAFIARBASADEJoBIgRFDQQLIAIgAzYCHCACIAQ2AhgLIAIoAhghBCABEBAgACADNgIEIAAgBDYCACACQZABaiQADwtBFEEBQbSlwAAoAgAiAEECIAAbEQAAAAtBh4zAAEEkQayMwAAQiAEACyADQQFBtKXAACgCACIAQQIgABsRAAAAC+gCAQV/AkBBzf97IABBECAAQRBLGyIAayABTQ0AIABBECABQQtqQXhxIAFBC0kbIgRqQQxqEAkiAkUNACACQXhqIQECQCAAQX9qIgMgAnFFBEAgASEADAELIAJBfGoiBSgCACIGQXhxIAIgA2pBACAAa3FBeGoiAiAAIAJqIAIgAWtBEEsbIgAgAWsiAmshAyAGQQNxBEAgACADIAAoAgRBAXFyQQJyNgIEIAAgA2oiAyADKAIEQQFyNgIEIAUgAiAFKAIAQQFxckECcjYCACAAIAAoAgRBAXI2AgQgASACEBQMAQsgASgCACEBIAAgAzYCBCAAIAEgAmo2AgALAkAgAEEEaigCACIBQQNxRQ0AIAFBeHEiAiAEQRBqTQ0AIABBBGogBCABQQFxckECcjYCACAAIARqIgEgAiAEayIEQQNyNgIEIAAgAmoiAiACKAIEQQFyNgIEIAEgBBAUCyAAQQhqIQMLIAMLiwMCBn8BfiMAQfAAayICJAAgAkHQAGoiAyABQRBqKQMANwMAIAJB2ABqIgQgAUEYaikDADcDACACQeAAaiIFIAFBIGopAwA3AwAgAkHoAGoiBiABQShqKQMANwMAIAIgASkDCDcDSCABKQMAIQggAkEIaiABQTRqEGUgASgCMCEHQfgAQQgQoQEiAUUEQEH4AEEIQbSlwAAoAgAiAEECIAAbEQAAAAsgASAINwMAIAEgAikDSDcDCCABIAc2AjAgASACKQMINwI0IAFBEGogAykDADcDACABQRhqIAQpAwA3AwAgAUEgaiAFKQMANwMAIAFBKGogBikDADcDACABQTxqIAJBEGopAwA3AgAgAUHEAGogAkEYaikDADcCACABQcwAaiACQSBqKQMANwIAIAFB1ABqIAJBKGopAwA3AgAgAUHcAGogAkEwaikDADcCACAB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gAE6AAAgACAAKAIIIgdBAWoiAjYCCAJAIAJBwQBJBEAgAiAGakEEakEAQT8gB2sQkQEaQcAAIAAoAghrQQdNBEAgAyAFEAogACgCCCICQcEATw0CIABBDGpBACACEJEBGgsgAEHEAGogCEIDhjcCACADIAUQCiAAQQA2AgggBEEIaiICIABB3ABqNgIEIAIgAzYCACAEKAIMIAQoAggiAGtBAnYiA0EEIANBBEkbIgIEQEEAIQMDQCABIAAoAgA2AAAgAEEEaiEAIAFBBGohASADQQFqIgMgAkkNAAsLIARBEGokAA8LIAJBwABBgJrAABB+AAsgAkHAAEGQmsAAEH0ACyACQcAAQaCawAAQfAAL1AIBAX8gABBUIAEgACgCTCICQRh0IAJBCHRBgID8B3FyIAJBCHZBgP4DcSACQRh2cnI2AAAgASAAQdAAaigCACICQRh0IAJBCHRBgID8B3FyIAJBCHZBgP4DcSACQRh2cnI2AAQgASAAQdQAaigCACICQRh0IAJBCHRBgID8B3FyIAJBCHZBgP4DcSACQRh2cnI2AAggASAAQdgAaigCACICQRh0IAJBCHRBgID8B3FyIAJBCHZBgP4DcSACQRh2cnI2AAwgASAAQdwAaigCACICQRh0IAJBCHRBgID8B3FyIAJBCHZBgP4DcSACQRh2cnI2ABAgASAAQeAAaigCACICQRh0IAJBCHRBgID8B3FyIAJBCHZBgP4DcSACQRh2cnI2ABQgASAAQeQAaigCACIAQRh0IABBCHRBgID8B3FyIABBCHZBgP4DcSAAQRh2cnI2ABgL7AICBX8BfiMAQeAAayICJAAgASkDACEHIAJBIGogAUEMahBlIAJBCGoiAyABQdQAaikCADcDACACQRBqIgQgAUHcAGopAgA3AwAgAkEYaiIFIAFB5ABqKQIANwMAIAIgASkCTDcDACABKAIIIQZB8ABBCBChASIBRQRAQfAAQQhBtKXAACgCACIAQQIgABsRAAAACyABIAY2AgggASAHNwMAIAEgAikDIDcCDCABQRRqIAJBKGopAwA3AgAgAUEcaiACQTBqKQMANwIAIAFBJGogAkE4aikDADcCACABQSxqIAJBQGspAwA3AgAgAUE0aiACQcgAaikDADcCACABQTxqIAJB0ABqKQMANwIAIAFBxABqIAJB2ABqKQMANwIAIAFB5ABqIAUpAwA3AgAgAUHcAGogBCkDADcCACABQdQAaiADKQMANwIAIAEgAikDADcCTCAAQeCQwAA2AgQgACABNgIAIAJB4ABqJAAL7AICBX8BfiMAQeAAayICJAAgASkDACEHIAJBIGogAUEMahBlIAJBCGoiAyABQdQAaikCADcDACACQRBqIgQgAUHcAGopAgA3AwAgAkEYaiIFIAFB5ABqKQIANwMAIAIgASkCTDcDACABKAIIIQZB8ABBCBChASIBRQRAQfAAQQhBtKXAACgCACIAQQIgABsRAAAACyABIAY2AgggASAHNwMAIAEgAikDIDcCDCABQRRqIAJBKGopAwA3AgAgAUEcaiACQTBqKQMANwIAIAFBJGogAkE4aikDADcCACABQSxqIAJBQGspAwA3AgAgAUE0aiACQcgAaikDADcCACABQTxqIAJB0ABqKQMANwIAIAFBxABqIAJB2ABqKQMANwIAIAFB5ABqIAUpAwA3AgAgAUHcAGogBCkDADcCACABQdQAaiADKQMANwIAIAEgAikDADcCTCAAQYSRwAA2AgQgACABNgIAIAJB4ABqJAALyAICBH8BfiMAQeAAayICJAAgAkHQAGoiAyABQRBqKQMANwMAIAJB2ABqIgQgAUEYaigCADYCACACIAEpAwg3A0ggASkDACEGIAJBCGogAUEgahBlIAEoAhwhBUHgAEEIEKEBIgFFBEBB4ABBCEG0pcAAKAIAIgBBAiAAGxEAAAALIAEgBjcDACABIAIpA0g3AwggASAFNgIcIAEgAikDCDcDICABQRBqIAMpAwA3AwAgAUEYaiAEKAIANgIAIAFBKGogAkEQaikDADcDACABQTBqIAJBGGopAwA3AwAgAUE4aiACQSBqKQMANwMAIAFBQGsgAkEoaikDADcDACABQcgAaiACQTBqKQMANwMAIAFB0ABqIAJBOGopAwA3AwAgAUHYAGogAkFAaykDADcDACAAQYSNwAA2AgQgACABNgIAIAJB4ABqJAALyAICBH8BfiMAQeAAayICJAAgAkHQAGoiAyABQRBqKQM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gVB//8DcUHkAG4iA0Gcf2wgBWpB//8DcUEBdEHaiMAAai8AADsAAAsCQCADQQpOBEAgAkF+aiICIARBCWpqIANBAXRB2ojAAGovAAA7AAAMAQsgAkF/aiICIARBCWpqIANBMGo6AAALIAFByKDAAEEAIARBCWogAmpBJyACaxAYIARBMGokAAu/AgEDfyMAQRBrIgIkAAJAIAAoAgAiAAJ/AkAgAUGAAU8EQCACQQA2AgwgAUGAEEkNASABQYCABEkEQCACIAFBP3FBgAFyOgAOIAIgAUEMdkHgAXI6AAwgAiABQQZ2QT9xQYABcjoADUEDDAMLIAIgAUE/cUGAAXI6AA8gAiABQRJ2QfABcjoADCACIAFBBnZBP3FBgAFyOgAOIAIgAUEMdkE/cUGAAXI6AA1BBAwCCyAAKAIIIgMgAEEEaigCAEYEfyAAQQEQaiAAKAIIBSADCyAAKAIAaiABOgAAIAAgACgCCEEBajYCCAwCCyACIAFBP3FBgAFyOgANIAIgAUEGdkHAAXI6AAxBAgsiARBqIABBCGoiAygCACIEIAAoAgBqIAJBDGogARCLARogAyABIARqNgIACyACQRBqJABBAAvLAgEIfyMAQYABayIBQShqIgJCADcDACABQSBqIgNCADcDACABQRhqIgRCADcDACABQRBqIgVCADcDACABQQhqIgZCADcDACABQgA3AwAgAUHaAGpCADcBACABQeIAakEAOwEAIAFBEDYCUCABQQA7AVQgAUEANgFWIAFB+ABqIAFB4ABqKAIANgIAIAFB8ABqIAFB2ABqKQMANwMAIAFByABqIgcgAUH0AGopAgA3AwAgASABKQNQNwNoIAEgASkCbDcDQCABQThqIgggBykDADcDACABIAEpA0A3AzAgAEHMAGogCCkDADcAACAAQcQAaiABKQMwNwAAIABBPGogAikDADcAACAAQTRqIAMpAwA3AAAgAEEsaiAEKQMANwAAIABBJGogBSkDADcAACAAQRxqIAYpAwA3AAAgACABKQMANwAUIABBADYCAAuxAgEDfyMAQYABayIEJAAgACgCACEAAkACQAJ/AkAgASgCACIDQRBxRQRAIAAoAgAhAiADQSBxDQEgAq0gARBVDAILIAAoAgAhAkEAIQADQCAAIARqQf8AaiACQQ9xIgNBMHIgA0HXAGogA0EKSRs6AAAgAEF/aiEAIAJBBHYiAg0ACyAAQYABaiICQYEBTw0CIAFB2IvAAEECIAAgBGpBgAFqQQAgAGsQGAwBC0EAIQADQCAAIARqQf8AaiACQQ9xIgNBMHIgA0E3aiADQQpJGzoAACAAQX9qIQAgAkEEdiICDQALIABBgAFqIgJBgQFPDQIgAUHYi8AAQQIgACAEakGAAWpBACAAaxAYCyAEQYABaiQADwsgAkGAAUHIi8AAEH4ACyACQYABQciLwAAQfgALrAICA38CfiAAIAApAwAiBiACrUIDhnwiBzcDACAAQQhqIgMgAykDACAHIAZUrXw3AwACQAJAQYABIAAoAlAiA2siBCACTQRAIABBEGoiBSADBEAgA0GBAU8NAiADIABB1ABqIgNqIAEgBBCLARogAEEANgJQIAUgA0EBEAwgAiAEayECIAEgBGohAQsgASACQQd2EAwgAkH/AHEiA0GBAU8NAiAAQdQAaiABIAJBgH9xaiADEIsBGiAAIAM2AlAPCwJAIAIgA2oiBCADTwRAIARBgAFLDQEgACADakHUAGogASACEIsBGiAAIAAoAlAgAmo2AlAPCyADIARB0JnAABB+AAsgBEGAAUHQmcAAEH0ACyADQYABQeCZwAAQfgALIANBgAFB8JnAABB9AAu8AgIFfwF+IABBIGohAyAAQQhqIQQgACkDACEHAkACQCAAKAIcIgJBwABGBEAgBCADEAdBACECIABBADYCHAwBCyACQT9LDQELIABBHGoiBSACakEEakGAAToAACAAIAAoAhwiBkEBaiICNgIcAkAgAkHBAEkEQCACIAVqQQRqQQBBPyAGaxCRARpBwAAgACgCHGtBB00EQCAEIAMQByAAKAIcIgJBwQBPDQIgAEEgakEAIAIQkQEaCyAAQdgAaiAHQgOGNwIAIAQgAxAHIABBADYCHCABIAAoAgg2AAAgASAAQQxqKAIANgAEIAEgAEEQaigCADYACCABIABBFGooAgA2AAwgASAAQRhqKAIANgAQDwsgAkHAAEGAmsAAEH4ACyACQcAAQZCawAAQfQALIAJBwABBoJrAABB8AAu1AgEDfyMAQRBrIgQkACAAKALIASICQccATQRAIAAgAmpBzAFqQQY6AAAgAkEBaiIDQcgARwRAIAAgA2pBzAFqQQBBxwAgAmsQkQEaC0EAIQIgAEEANgLIASAAQZMCaiIDIAMtAABBgAFyOgAAA0AgACACaiIDIAMtAAAgA0HMAWotAABzOgAAIAJBAWoiAkHIAEcNAAsgABAOIAEgACkAADcAACABQThqIABBOGopAAA3AAAgAUEwaiAAQTBqKQAANwAAIAFBKGogAEEoaikAADcAACABQSBqIABBIGopAAA3AAAgAUEYaiAAQRhqKQAANwAAIAFBEGogAEEQaikAADcAACABQQhqIABBCGopAAA3AAAgBEEQaiQADwtBsJrAAEEXIARBCGpByJrAAEGknsAAEHkAC7UCAQN/IwBBEGsiBCQAIAAoAsgBIgJBxwBNBEAgACACakHMAWpBAToAACACQQFqIgNByABHBEAgACADakHMAWpBAEHHACACaxCRARoLQQAhAiAAQQA2AsgBIABBkwJqIgMgAy0AAEGAAXI6AAADQCAAIAJqIgMgAy0AACADQcwBai0AAHM6AAAgAkEBaiICQcgARw0ACyAAEA4gASAAKQAANwAAIAFBOGogAEE4aikAADcAACABQTBqIABBMGopAAA3AAAgAUEoaiAAQShqKQAANwAAIAFBIGogAEEgaikAADcAACABQRhqIABBGGopAAA3AAAgAUEQaiAAQRBqKQAANwAAIAFBCGogAEEIaikAADcAACAEQRBqJAAPC0GwmsAAQRcgBEEIakHImsAAQeSdwAAQeQALswICBX8BfiAAQQxqIQMgAEHMAGohBCAAKQMAIQcCQAJAIAAoAggiAkHAAEYEQCAEIAMQDUEAIQIgAEEANgIIDAELIAJBP0sNAQsgAEEIaiIFIAJqQQRqQYABOgAAIAAgACgCCCIGQQFqIgI2AggCQCACQcEASQRAIAIgBWpBBGpBAEE/IAZrEJEBGkHAACAAKAIIa0EHTQRAIAQgAxANIAAoAggiAkHBAE8NAiAAQQxqQQAgAhCRARoLIABBxABqIAdCA4Y3AgAgBCADEA0gAEEANgIIIAEgACgCTDYAACABIABB0ABqKAIANgAEIAEgAEHUAGooAgA2AAggASAAQdgAaigCADYADA8LIAJBwABBgJrAABB+AAsgAkHAAEGQmsAAEH0ACyACQcAAQaCawAAQfAALhgIBBH8CQCAAQQRqKAIAIgYgAEEIaigCACIFayACTwRAIAAoAgAhBAwBCwJAAn8gAiAFaiIDIAVPBEBBACAGQQF0IgUgAyAFIANLGyIDQQggA0EISxsiA0EASA0BGgJAIAAoAgBBACAGGyIERQRAIANBARChASIEDQQMAQsgAyAGRg0DIAZFBEAgA0EBEKEBIgRFDQEMBAsgBCAGQQEgAxCaASIEDQMLQQEMAQtBAAsiBARAIAMgBEG0pcAAKAIAIgBBAiAAGxEAAAALEJsBAAsgACAENgIAIABBBGogAzYCACAAQQhqKAIAIQULIAQgBWogASACEIsBGiAAQQhqIAIgBWo2AgALjAIBA38gACAAKQMAIAKtQgOGfDcDAAJAAkBBwAAgACgCCCIDayIEIAJNBEAgAEHMAGoiBSADBEAgA0HBAE8NAiADIABBDGoiA2ogASAEEIsBGiAAQQA2AgggBSADQQEQBCACIARrIQIgASAEaiEBCyABIAJBBnYQBCACQT9xIgNBwQBPDQIgAEEMaiABIAJBQHFqIAMQiwEaIAAgAzYCCA8LAkAgAiADaiIEIANPBEAgBEHAAEsNASAAIANqQQxqIAEgAhCLARogACAAKAIIIAJqNgIIDwsgAyAEQdCZwAAQfgALIARBwABB0JnAABB9AAsgA0HAAEHgmcAAEH4ACyADQcAAQfCZwAAQfQALqAICA38BfiMAQdAAayICJAAgASkDACEFIAJBEGogAUEMahBlIAJBCGoiAyABQdQAaikCADcDACACIAEpAkw3AwAgASgCCCEEQeAAQQgQoQEiAUUEQEHgAEEIQbSlwAAoAgAiAEECIAAbEQAAAAsgASAENgIIIAEgBTcDACABIAIpAxA3AgwgAUEUaiACQRhqKQMANwIAIAFBHGogAkEgaikDADcCACABQSRqIAJBKGopAwA3AgAgAUEsaiACQTBqKQMANwIAIAFBNGogAkE4aikDADcCACABQTxqIAJBQGspAwA3AgAgAUHEAGogAkHIAGopAwA3AgAgAUHUAGogAykDADcCACABIAIpAwA3AkwgAEG8jMAANgIEIAAgATYCACACQdAAaiQAC4gCAQN/IAAgACkDACACrXw3AwACQAJAQcAAIAAoAhwiA2siBCACTQRAIABBCGoiBSADBEAgA0HBAE8NAiADIABBIGoiA2ogASAEEIsBGiAAQQA2AhwgBSADQQEQCCACIARrIQIgASAEaiEBCyABIAJBBnYQCCACQT9xIgNBwQBPDQIgAEEgaiABIAJBQHFqIAMQiwEaIAAgAzYCHA8LAkAgAiADaiIEIANPBEAgBEHAAEsNASAAIANqQSBqIAEgAhCLARogACAAKAIcIAJqNgIcDwsgAyAEQdCZwAAQfgALIARBwABB0JnAABB9AAsgA0HAAEHgmcAAEH4ACyADQcAAQfCZwAAQfQALqAICA38BfiMAQdAAayICJAAgASkDACEFIAJBEGogAUEMahBlIAJBCGoiAyABQdQAaikCADcDACACIAEpAkw3AwAgASgCCCEEQeAAQQgQoQEiAUUEQEHgAEEIQbSlwAAoAgAiAEECIAAbEQAAAAsgASAENgIIIAEgBTcDACABIAIpAxA3AgwgAUEUaiACQRhqKQMANwIAIAFBHGogAkEgaikDADcCACABQSRqIAJBKGopAwA3AgAgAUEsaiACQTBqKQMANwIAIAFBNGogAkE4aikDADcCACABQTxqIAJBQGspAwA3AgAgAUHEAGogAkHIAGopAwA3AgAgAUHUAGogAykDADcCACABIAIpAwA3AkwgAEGokcAANgIEIAAgATYCACACQdAAaiQAC5UCAQN/IwBBEGsiBCQAIAAoAsgBIgJB5wBNBEAgACACakHMAWpBBjoAACACQQFqIgNB6ABHBEAgACADakHMAWpBAEHnACACaxCRARoLQQAhAiAAQQA2AsgBIABBswJqIgMgAy0AAEGAAXI6AAADQCAAIAJqIgMgAy0AACADQcwBai0AAHM6AAAgAkEBaiICQegARw0ACyAAEA4gASAAKQAANwAAIAFBKGogAEEoaikAADcAACABQSBqIABBIGopAAA3AAAgAUEYaiAAQRhqKQAANwAAIAFBEGogAEEQaikAADcAACABQQhqIABBCGopAAA3AAAgBEEQaiQADwtBsJrAAEEXIARBCGpByJrAAEGUnsAAEHkAC5UCAQN/IwBBEGsiBCQAIAAoAsgBIgJB5wBNBEAgACACakHMAWpBAToAACACQQFqIgNB6ABHBEAgACADakHMAWpBAEHnACACaxCRARoLQQAhAiAAQQA2AsgBIABBswJqIgMgAy0AAEGAAXI6AAADQCAAIAJqIgMgAy0AACADQcwBai0AAHM6AAAgAkEBaiICQegARw0ACyAAEA4gASAAKQAANwAAIAFBKGogAEEoaikAADcAACABQSBqIABBIGopAAA3AAAgAUEYaiAAQRhqKQAANwAAIAFBEGogAEEQaikAADcAACABQQhqIABBCGopAAA3AAAgBEEQaiQADwtBsJrAAEEXIARBCGpByJrAAEHUncAAEHkAC/MBAQR/IwBBkAFrIgIkACACQQA2AgAgAkEEciEFA0AgAyAFaiABIANqLQAAOgAAIAIgAigCAEEBaiIENgIAIANBAWoiA0HAAEcNAAsgBEE/TQRAIARBwAAQfwALIAJByABqIAJBxAAQiwEaIABBOGogAkGEAWopAgA3AAAgAEEwaiACQfwAaikCADcAACAAQShqIAJB9ABqKQIANwAAIABBIGogAkHsAGopAgA3AAAgAEEYaiACQeQAaikCADcAACAAQRBqIAJB3ABqKQIANwAAIABBCGogAkHUAGopAgA3AAAgACACKQJMNwAAIAJBkAFqJAAL9QEBA38jAEEQayIEJAAgACgCyAEiAkGHAU0EQCAAIAJqQcwBakEBOgAAIAJBAWoiA0GIAUcEQCAAIANqQcwBakEAQYcBIAJrEJEBGgtBACECIABBADYCyAEgAEHTAmoiAyADLQAAQYABcjoAAANAIAAgAmoiAyADLQAAIANBzAFqLQAAczoAACACQQFqIgJBiAFHDQALIAAQDiABIAApAAA3AAAgAUEYaiAAQRhqKQAANwAAIAFBEGogAEEQaikAADcAACABQQhqIABBCGopAAA3AAAgBEEQaiQADwtBsJrAAEEXIARBCGpByJrAAEHEncAAEHkAC/UBAQN/IwBBEGsiBCQAIAAoAsgBIgJBhwFNBEAgACACakHMAWpBBjoAACACQQFqIgNBiAFHBEAgACADakHMAWpBAEGHASACaxCRARoLQQAhAiAAQQA2AsgBIABB0wJqIgMgAy0AAEGAAXI6AAADQCAAIAJqIgMgAy0AACADQcwBai0AAHM6AAAgAkEBaiICQYgBRw0ACyAAEA4gASAAKQAANwAAIAFBGGogAEEYaikAADcAACABQRBqIABBEGopAAA3AAAgAUEIaiAAQQhqKQAANwAAIARBEGokAA8LQbCawABBFyAEQQhqQciawABBhJ7AABB5AAv1AQEDfyMAQRBrIgQkACAAKALIASICQY8BTQRAIAAgAmpBzAFqQQE6AAAgAkEBaiIDQZABRwRAIAAgA2pBzAFqQQBBjwEgAmsQkQEaC0EAIQIgAEEANgLIASAAQdsCaiIDIAMtAABBgAFyOgAAA0AgACACaiIDIAMtAAAgA0HMAWotAABzOgAAIAJBAWoiAkGQAUcNAAsgABAOIAEgACkAADcAACABQRhqIABBGGooAAA2AAAgAUEQaiAAQRBqKQAANwAAIAFBCGogAEEIaikAADcAACAEQRBqJAAPC0GwmsAAQRcgBEEIakHImsAAQdiawAAQeQAL9QEBA38jAEEQayIEJAAgACgCyAEiAkGPAU0EQCAAIAJqQcwBakEGOgAAIAJBAWoiA0GQAUcEQCAAIANqQcwBakEAQY8BIAJrEJEBGgtBACECIABBADYCyAEgAEHbAmoiAyADLQAAQYABcjoAAANAIAAgAmoiAyADLQAAIANBzAFqLQAAczoAACACQQFqIgJBkAFHDQALIAAQDiABIAApAAA3AAAgAUEYaiAAQRhqKAAANgAAIAFBEGogAEEQaikAADcAACABQQhqIABBCGopAAA3AAAgBEEQaiQADwtBsJrAAEEXIARBCGpByJrAAEH0ncAAEHkAC8MBAQJ/AkACQCAAQQRqKAIAIgMgACgCCCICayABSQRAIAEgAmoiASACSQ0BIANBAXQiAiABIAIgAUsbIgFBCCABQQhLGyICQQBIDQECQCAAKAIAQQAgAxsiAUUEQCACQQEQoQEhAQwBCyACIANGDQAgA0UEQCACQQEQoQEhAQ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AoAgAiAEECIAAbEQAAAAsgASACQZgBakHIARCLASIBIAM2AsgBIAFBzAFqIAJBCGpBkAEQiwEaIABBnI7AADYCBCAAIAE2AgAgAkHgAmokAAuZAQECfyMAQeACayICJAAgAkGYAWogAUHIARCLARogAkEIaiABQcwBahBvIAEoAsgBIQNB4AJBCBChASIBRQRAQeACQQhBtKXAACgCACIAQQIgABsRAAAACyABIAJBmAFqQcgBEIsBIgEgAzYCyAEgAUHMAWogAkEIakGQARCLARogAEHQj8AANgIEIAAgATYCACACQeACaiQAC4IBAQF/IwBBMGsiAkEOaiABKAAKNgEAIAJBEmogAS8ADjsBACACIAEvAAA7AQQgAiABKQACNwEGIAJBEDYCACACQSBqIAJBCGopAwA3AwAgAkEoaiACQRBqKAIANgIAIAIgAikDADcDGCAAIAIpAhw3AAAgAEEIaiACQSRqKQIANwAAC5MBAQJ/IwBBkAJrIgIkACACQcgAaiABQcgBEIsBGiACIAFBzAFqEGsgASgCyAEhA0GYAkEIEKEBIgFFBEBBmAJBCEG0pcAAKAIAIgBBAiAAGxEAAAALIAEgAkHIAGpByAEQiwEiASADNgLIASABQcwBaiACQcgAEIsBGiAAQdSNwAA2AgQgACABNgIAIAJBkAJqJAALkwEBAn8jAEGwAmsiAiQAIAJB6ABqIAFByAEQiwEaIAIgAUHMAWoQbSABKALIASEDQbgCQQgQoQEiAUUEQEG4AkEIQbSlwAAoAgAiAEECIAAbEQAAAAsgASACQegAakHIARCLASIBIAM2AsgBIAFBzAFqIAJB6AAQiwEaIABB+I3AADYCBCAAIAE2AgAgAkGwAmokAAuTAQECfyMAQdACayICJAAgAkGIAWogAUHIARCLARogAiABQcwBahBuIAEoAsgBIQNB2AJBCBChASIBRQRAQdgCQQhBtKXAACgCACIAQQIgABsRAAAACyABIAJBiAFqQcgBEIsBIgEgAzYCyAEgAUHMAWogAkGIARCLARogAEHAjsAANgIEIAAgATYCACACQdACaiQAC5MBAQJ/IwBBsAJrIgIkACACQegAaiABQcgBEIsBGiACIAFBzAFqEG0gASgCyAEhA0G4AkEIEKEBIgFFBEBBuAJBCEG0pcAAKAIAIgBBAiAAGxEAAAALIAEgAkHoAGpByAEQiwEiASADNgLIASABQcwBaiACQegAEIsBGiAAQeSOwAA2AgQgACABNgIAIAJBsAJqJAALkwEBAn8jAEGQAmsiAiQAIAJByABqIAFByAEQiwEaIAIgAUHMAWoQayABKALIASEDQZgCQQgQoQEiAUUEQEGYAkEIQbSlwAAoAgAiAEECIAAbEQAAAAsgASACQcgAakHIARCLASIBIAM2AsgBIAFBzAFqIAJByAAQiwEaIABBiI/AADYCBCAAIAE2AgAgAkGQAmokAAuTAQECfyMAQdACayICJAAgAkGIAWogAUHIARCLARogAiABQcwBahBuIAEoAsgBIQNB2AJBCBChASIBRQRAQdgCQQhBtKXAACgCACIAQQIgABsRAAAACyABIAJBiAFqQcgBEIsBIgEgAzYCyAEgAUHMAWogAkGIARCLARogAEGsj8AANgIEIAAgATYCACACQdACaiQAC34BAX8jAEFAaiIFJAAgBSABNgIMIAUgADYCCCAFIAM2AhQgBSACNgIQIAVBLGpBAjYCACAFQTxqQQQ2AgAgBUICNwIcIAVB8IvAADYCGCAFQQE2AjQgBSAFQTBqNgIoIAUgBUEQajYCOCAFIAVBCGo2AjAgBUEYaiAEEJABAAuVAQAgAEIANwMIIABCADcDACAAQQA2AlAgAEGQmcAAKQMANwMQIABBGGpBmJnAACkDADcDACAAQSBqQaCZwAApAwA3AwAgAEEoakGomcAAKQMANwMAIABBMGpBsJnAACkDADcDACAAQThqQbiZwAApAwA3AwAgAEFAa0HAmcAAKQMANwMAIABByABqQciZwAApAwA3AwALlQEAIABCADcDCCAAQgA3AwAgAEEANgJQIABB0JjAACkDADcDECAAQRhqQdiYwAApAwA3AwAgAEEgakHgmMAAKQMANwMAIABBKGpB6JjAACkDADcDACAAQTBqQfCYwAApAwA3AwAgAEE4akH4mMAAKQMANwMAIABBQGtBgJnAACkDADcDACAAQcgAakGImcAAKQMANwMAC20BAX8jAEEwayIDJAA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IQIgABAQIAEgAigCABEEACACKAIEBEAgARAQCw8LEJ0BAAsQngEAC0gAAkAgAARAIAAoAgANASAAQX82AgAgACgCBCABIAIgAEEIaigCACgCDBECACACBEAgARAQCyAAQQA2AgAPCxCdAQALEJ4BAAtKAAJ/IAFBgIDEAEcEQEEBIAAoAhggASAAQRxqKAIAKAIQEQEADQEaCyACRQRAQQAPCyAAKAIYIAIgAyAAQRxqKAIAKAIMEQMACwtdACAAQgA3AwAgAEEANgIwIABB0JfAACkDADcDCCAAQRBqQdiXwAApAwA3AwAgAEEYakHgl8AAKQMANwMAIABBIGpB6JfAACkDADcDACAAQShqQfCXwAApAwA3AwALSAEBfyMAQSBrIgMkACADQRRqQQA2AgAgA0HIoMAANgIQIANCATcCBCADIAE2AhwgAyAANgIYIAMgA0EYajYCACADIAIQkAEAC1AAIABBADYCCCAAQgA3AwAgAEGsmMAAKQIANwJMIABB1ABqQbSYwAApAgA3AgAgAEHcAGpBvJjAACkCADcCACAAQeQAakHEmMAAKQIANwIAC1AAIABBADYCCCAAQgA3AwAgAEGMmMAAKQIANwJMIABB1ABqQZSYwAApAgA3AgAgAEHcAGpBnJjAACkCADcCACAAQeQAakGkmMAAKQIANwIACzMBAX8gAgRAIAAhAwNAIAMgAS0AADoAACABQQFqIQEgA0EBaiEDIAJBf2oiAg0ACwsgAAs1AQJ/IAAoAgAiACACEGogAEEIaiIDKAIAIgQgACgCAGogASACEIsBGiADIAIgBGo2AgBBAAsrAAJAIABBfEsNACAARQRAQQQPCyAAIABBfUlBAnQQoQEiAEUNACAADwsACz0AIABCADcDACAAQQA2AhwgAEH4l8AAKQMANwMIIABBEGpBgJjAACkDADcDACAAQRhqQYiYwAAoAgA2AgALPQAgAEEANgIcIABCADcDACAAQRhqQYiYwAAoAgA2AgAgAEEQakGAmMAAKQMANwMAIABB+JfAACkDADcDCAtMAQF/IwBBEGsiAiQAIAIgATYCDCACIAA2AgggAkGYiMAANgIEIAJByKDAADYCACACKAIIRQRAQZ2gwAB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jggKGEwNGUxODk3MSk=", -); -let wasm; - -let cachedTextDecoder = new TextDecoder("utf-8", { - ignoreBOM: true, - fatal: true, -}); - -cachedTextDecoder.decode(); - -let cachegetUint8Memory0 = null; -function getUint8Memory0() { - if ( - cachegetUint8Memory0 === null || - cachegetUint8Memory0.buffer !== wasm.memory.buffer - ) { - cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer); - } - return cachegetUint8Memory0; -} - -function getStringFromWasm0(ptr, len) { - return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); -} - -const heap = new Array(32).fill(undefined); - -heap.push(undefined, null, true, false); - -let heap_next = heap.length; - -function addHeapObject(obj) { - if (heap_next === heap.length) heap.push(heap.length + 1); - const idx = heap_next; - heap_next = heap[idx]; - - heap[idx] = obj; - return idx; -} - -function getObject(idx) { - return heap[idx]; -} - -function dropObject(idx) { - if (idx < 36) return; - heap[idx] = heap_next; - heap_next = idx; -} - -function takeObject(idx) { - const ret = getObject(idx); - dropObject(idx); - return ret; -} - -let WASM_VECTOR_LEN = 0; - -let cachedTextEncoder = new TextEncoder("utf-8"); - -const encodeString = - (typeof cachedTextEncoder.encodeInto === "function" - ? function (arg, view) { - return cachedTextEncoder.encodeInto(arg, view); - } - : function (arg, view) { - const buf = cachedTextEncoder.encode(arg); - view.set(buf); - return { - read: arg.length, - written: buf.length, - }; - }); - -function passStringToWasm0(arg, malloc, realloc) { - if (realloc === undefined) { - const buf = cachedTextEncoder.encode(arg); - const ptr = malloc(buf.length); - getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf); - WASM_VECTOR_LEN = buf.length; - return ptr; - } - - let len = arg.length; - let ptr = malloc(len); - - const mem = getUint8Memory0(); - - let offset = 0; - - for (; offset < len; offset++) { - const code = arg.charCodeAt(offset); - if (code > 0x7F) break; - mem[ptr + offset] = code; - } - - if (offset !== len) { - if (offset !== 0) { - arg = arg.slice(offset); - } - ptr = realloc(ptr, len, len = offset + arg.length * 3); - const view = getUint8Memory0().subarray(ptr + offset, ptr + len); - const ret = encodeString(arg, view); - - offset += ret.written; - } - - WASM_VECTOR_LEN = offset; - return ptr; -} -/** -* @param {string} algorithm -* @returns {DenoHash} -*/ -export function create_hash(algorithm) { - var ptr0 = passStringToWasm0( - algorithm, - wasm.__wbindgen_malloc, - wasm.__wbindgen_realloc, - ); - var len0 = WASM_VECTOR_LEN; - var ret = wasm.create_hash(ptr0, len0); - return DenoHash.__wrap(ret); -} - -function _assertClass(instance, klass) { - if (!(instance instanceof klass)) { - throw new Error(`expected instance of ${klass.name}`); - } - return instance.ptr; -} - -function passArray8ToWasm0(arg, malloc) { - const ptr = malloc(arg.length * 1); - getUint8Memory0().set(arg, ptr / 1); - WASM_VECTOR_LEN = arg.length; - return ptr; -} -/** -* @param {DenoHash} hash -* @param {Uint8Array} data -*/ -export function update_hash(hash, data) { - _assertClass(hash, DenoHash); - var ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc); - var len0 = WASM_VECTOR_LEN; - wasm.update_hash(hash.ptr, ptr0, len0); -} - -let cachegetInt32Memory0 = null; -function getInt32Memory0() { - if ( - cachegetInt32Memory0 === null || - cachegetInt32Memory0.buffer !== wasm.memory.buffer - ) { - cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer); - } - return cachegetInt32Memory0; -} - -function getArrayU8FromWasm0(ptr, len) { - return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len); -} -/** -* @param {DenoHash} hash -* @returns {Uint8Array} -*/ -export function digest_hash(hash) { - try { - const retptr = wasm.__wbindgen_export_2.value - 16; - wasm.__wbindgen_export_2.value = retptr; - _assertClass(hash, DenoHash); - wasm.digest_hash(retptr, hash.ptr); - var r0 = getInt32Memory0()[retptr / 4 + 0]; - var r1 = getInt32Memory0()[retptr / 4 + 1]; - var v0 = getArrayU8FromWasm0(r0, r1).slice(); - wasm.__wbindgen_free(r0, r1 * 1); - return v0; - } finally { - wasm.__wbindgen_export_2.value += 16; - } -} - -/** -*/ -export class DenoHash { - static __wrap(ptr) { - const obj = Object.create(DenoHash.prototype); - obj.ptr = ptr; - - return obj; - } - - free() { - const ptr = this.ptr; - this.ptr = 0; - - wasm.__wbg_denohash_free(ptr); - } -} - -async function load(module, imports) { - if (typeof Response === "function" && module instanceof Response) { - if (typeof WebAssembly.instantiateStreaming === "function") { - try { - return await WebAssembly.instantiateStreaming(module, imports); - } catch (e) { - if (module.headers.get("Content-Type") != "application/wasm") { - console.warn( - "`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", - e, - ); - } else { - throw e; - } - } - } - - const bytes = await module.arrayBuffer(); - return await WebAssembly.instantiate(bytes, imports); - } else { - const instance = await WebAssembly.instantiate(module, imports); - - if (instance instanceof WebAssembly.Instance) { - return { instance, module }; - } else { - return instance; - } - } -} - -async function init(input) { - if (typeof input === "undefined") { - input = import.meta.url.replace(/\.js$/, "_bg.wasm"); - } - const imports = {}; - imports.wbg = {}; - imports.wbg.__wbindgen_string_new = function (arg0, arg1) { - var ret = getStringFromWasm0(arg0, arg1); - return addHeapObject(ret); - }; - imports.wbg.__wbindgen_throw = function (arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); - }; - imports.wbg.__wbindgen_rethrow = function (arg0) { - throw takeObject(arg0); - }; - - if ( - typeof input === "string" || - (typeof Request === "function" && input instanceof Request) || - (typeof URL === "function" && input instanceof URL) - ) { - input = fetch(input); - } - - const { instance, module } = await load(await input, imports); - - wasm = instance.exports; - init.__wbindgen_wasm_module = module; - - return wasm; -} - -export default init; diff --git a/src/resources/vendor/deno-land/std@0-91-0/hash/hasher.ts b/src/resources/vendor/deno-land/std@0-91-0/hash/hasher.ts deleted file mode 100644 index e04cb56ef6f..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/hash/hasher.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. - -export type Message = string | ArrayBuffer; -export type OutputFormat = "hex" | "base64"; - -export interface Hasher { - update(data: Message): this; - digest(): ArrayBuffer; - toString(format?: OutputFormat): string; -} diff --git a/src/resources/vendor/deno-land/std@0-91-0/hash/mod.ts b/src/resources/vendor/deno-land/std@0-91-0/hash/mod.ts deleted file mode 100644 index 7b3b9f383ff..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/hash/mod.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. - -import { Hash } from "./_wasm/hash.ts"; -import type { Hasher } from "./hasher.ts"; - -export type { Hasher } from "./hasher.ts"; -export const supportedAlgorithms = [ - "md2", - "md4", - "md5", - "ripemd160", - "ripemd320", - "sha1", - "sha224", - "sha256", - "sha384", - "sha512", - "sha3-224", - "sha3-256", - "sha3-384", - "sha3-512", - "keccak224", - "keccak256", - "keccak384", - "keccak512", -] as const; -export type SupportedAlgorithm = typeof supportedAlgorithms[number]; -/** - * Creates a new `Hash` instance. - * - * @param algorithm name of hash algorithm to use - */ -export function createHash(algorithm: SupportedAlgorithm): Hasher { - return new Hash(algorithm as string); -} diff --git a/src/resources/vendor/deno-land/std@0-91-0/path/_constants.ts b/src/resources/vendor/deno-land/std@0-91-0/path/_constants.ts deleted file mode 100644 index 88374ae059f..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/path/_constants.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. - -// Alphabet chars. -export const CHAR_UPPERCASE_A = 65; /* A */ -export const CHAR_LOWERCASE_A = 97; /* a */ -export const CHAR_UPPERCASE_Z = 90; /* Z */ -export const CHAR_LOWERCASE_Z = 122; /* z */ - -// Non-alphabetic chars. -export const CHAR_DOT = 46; /* . */ -export const CHAR_FORWARD_SLASH = 47; /* / */ -export const CHAR_BACKWARD_SLASH = 92; /* \ */ -export const CHAR_VERTICAL_LINE = 124; /* | */ -export const CHAR_COLON = 58; /* : */ -export const CHAR_QUESTION_MARK = 63; /* ? */ -export const CHAR_UNDERSCORE = 95; /* _ */ -export const CHAR_LINE_FEED = 10; /* \n */ -export const CHAR_CARRIAGE_RETURN = 13; /* \r */ -export const CHAR_TAB = 9; /* \t */ -export const CHAR_FORM_FEED = 12; /* \f */ -export const CHAR_EXCLAMATION_MARK = 33; /* ! */ -export const CHAR_HASH = 35; /* # */ -export const CHAR_SPACE = 32; /* */ -export const CHAR_NO_BREAK_SPACE = 160; /* \u00A0 */ -export const CHAR_ZERO_WIDTH_NOBREAK_SPACE = 65279; /* \uFEFF */ -export const CHAR_LEFT_SQUARE_BRACKET = 91; /* [ */ -export const CHAR_RIGHT_SQUARE_BRACKET = 93; /* ] */ -export const CHAR_LEFT_ANGLE_BRACKET = 60; /* < */ -export const CHAR_RIGHT_ANGLE_BRACKET = 62; /* > */ -export const CHAR_LEFT_CURLY_BRACKET = 123; /* { */ -export const CHAR_RIGHT_CURLY_BRACKET = 125; /* } */ -export const CHAR_HYPHEN_MINUS = 45; /* - */ -export const CHAR_PLUS = 43; /* + */ -export const CHAR_DOUBLE_QUOTE = 34; /* " */ -export const CHAR_SINGLE_QUOTE = 39; /* ' */ -export const CHAR_PERCENT = 37; /* % */ -export const CHAR_SEMICOLON = 59; /* ; */ -export const CHAR_CIRCUMFLEX_ACCENT = 94; /* ^ */ -export const CHAR_GRAVE_ACCENT = 96; /* ` */ -export const CHAR_AT = 64; /* @ */ -export const CHAR_AMPERSAND = 38; /* & */ -export const CHAR_EQUAL = 61; /* = */ - -// Digits -export const CHAR_0 = 48; /* 0 */ -export const CHAR_9 = 57; /* 9 */ diff --git a/src/resources/vendor/deno-land/std@0-91-0/path/_interface.ts b/src/resources/vendor/deno-land/std@0-91-0/path/_interface.ts deleted file mode 100644 index d5015cbebed..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/path/_interface.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// This module is browser compatible. - -/** - * A parsed path object generated by path.parse() or consumed by path.format(). - */ -export interface ParsedPath { - /** - * The root of the path such as '/' or 'c:\' - */ - root: string; - /** - * The full directory path such as '/home/user/dir' or 'c:\path\dir' - */ - dir: string; - /** - * The file name including extension (if any) such as 'index.html' - */ - base: string; - /** - * The file extension (if any) such as '.html' - */ - ext: string; - /** - * The file name without extension (if any) such as 'index' - */ - name: string; -} - -export type FormatInputPathObject = Partial; diff --git a/src/resources/vendor/deno-land/std@0-91-0/path/_util.ts b/src/resources/vendor/deno-land/std@0-91-0/path/_util.ts deleted file mode 100644 index c2a23ade61d..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/path/_util.ts +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. - -import type { FormatInputPathObject } from "./_interface.ts"; -import { - CHAR_BACKWARD_SLASH, - CHAR_DOT, - CHAR_FORWARD_SLASH, - CHAR_LOWERCASE_A, - CHAR_LOWERCASE_Z, - CHAR_UPPERCASE_A, - CHAR_UPPERCASE_Z, -} from "./_constants.ts"; - -export function assertPath(path: string): void { - if (typeof path !== "string") { - throw new TypeError( - `Path must be a string. Received ${JSON.stringify(path)}`, - ); - } -} - -export function isPosixPathSeparator(code: number): boolean { - return code === CHAR_FORWARD_SLASH; -} - -export function isPathSeparator(code: number): boolean { - return isPosixPathSeparator(code) || code === CHAR_BACKWARD_SLASH; -} - -export function isWindowsDeviceRoot(code: number): boolean { - return ( - (code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z) || - (code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z) - ); -} - -// Resolves . and .. elements in a path with directory names -export function normalizeString( - path: string, - allowAboveRoot: boolean, - separator: string, - isPathSeparator: (code: number) => boolean, -): string { - let res = ""; - let lastSegmentLength = 0; - let lastSlash = -1; - let dots = 0; - let code: number | undefined; - for (let i = 0, len = path.length; i <= len; ++i) { - if (i < len) code = path.charCodeAt(i); - else if (isPathSeparator(code!)) break; - else code = CHAR_FORWARD_SLASH; - - if (isPathSeparator(code!)) { - if (lastSlash === i - 1 || dots === 1) { - // NOOP - } else if (lastSlash !== i - 1 && dots === 2) { - if ( - res.length < 2 || - lastSegmentLength !== 2 || - res.charCodeAt(res.length - 1) !== CHAR_DOT || - res.charCodeAt(res.length - 2) !== CHAR_DOT - ) { - if (res.length > 2) { - const lastSlashIndex = res.lastIndexOf(separator); - if (lastSlashIndex === -1) { - res = ""; - lastSegmentLength = 0; - } else { - res = res.slice(0, lastSlashIndex); - lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); - } - lastSlash = i; - dots = 0; - continue; - } else if (res.length === 2 || res.length === 1) { - res = ""; - lastSegmentLength = 0; - lastSlash = i; - dots = 0; - continue; - } - } - if (allowAboveRoot) { - if (res.length > 0) res += `${separator}..`; - else res = ".."; - lastSegmentLength = 2; - } - } else { - if (res.length > 0) res += separator + path.slice(lastSlash + 1, i); - else res = path.slice(lastSlash + 1, i); - lastSegmentLength = i - lastSlash - 1; - } - lastSlash = i; - dots = 0; - } else if (code === CHAR_DOT && dots !== -1) { - ++dots; - } else { - dots = -1; - } - } - return res; -} - -export function _format( - sep: string, - pathObject: FormatInputPathObject, -): string { - const dir: string | undefined = pathObject.dir || pathObject.root; - const base: string = pathObject.base || - (pathObject.name || "") + (pathObject.ext || ""); - if (!dir) return base; - if (dir === pathObject.root) return dir + base; - return dir + sep + base; -} - -const WHITESPACE_ENCODINGS: Record = { - "\u0009": "%09", - "\u000A": "%0A", - "\u000B": "%0B", - "\u000C": "%0C", - "\u000D": "%0D", - "\u0020": "%20", -}; - -export function encodeWhitespace(string: string): string { - return string.replaceAll(/[\s]/g, (c) => { - return WHITESPACE_ENCODINGS[c] ?? c; - }); -} diff --git a/src/resources/vendor/deno-land/std@0-91-0/path/common.ts b/src/resources/vendor/deno-land/std@0-91-0/path/common.ts deleted file mode 100644 index 390c04f1db7..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/path/common.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// This module is browser compatible. - -import { SEP } from "./separator.ts"; - -/** Determines the common path from a set of paths, using an optional separator, - * which defaults to the OS default separator. - * - * import { common } from "https://deno.land/std/path/mod.ts"; - * const p = common([ - * "./deno/std/path/mod.ts", - * "./deno/std/fs/mod.ts", - * ]); - * console.log(p); // "./deno/std/" - * - */ -export function common(paths: string[], sep = SEP): string { - const [first = "", ...remaining] = paths; - if (first === "" || remaining.length === 0) { - return first.substring(0, first.lastIndexOf(sep) + 1); - } - const parts = first.split(sep); - - let endOfPrefix = parts.length; - for (const path of remaining) { - const compare = path.split(sep); - for (let i = 0; i < endOfPrefix; i++) { - if (compare[i] !== parts[i]) { - endOfPrefix = i; - } - } - - if (endOfPrefix === 0) { - return ""; - } - } - const prefix = parts.slice(0, endOfPrefix).join(sep); - return prefix.endsWith(sep) ? prefix : `${prefix}${sep}`; -} diff --git a/src/resources/vendor/deno-land/std@0-91-0/path/glob.ts b/src/resources/vendor/deno-land/std@0-91-0/path/glob.ts deleted file mode 100644 index d599c1b88e2..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/path/glob.ts +++ /dev/null @@ -1,387 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// This module is browser compatible. - -import { osType } from "../_util/os.ts"; -import { join, normalize } from "./mod.ts"; -import { SEP, SEP_PATTERN } from "./separator.ts"; - -export interface GlobOptions { - /** Extended glob syntax. - * See https://www.linuxjournal.com/content/bash-extended-globbing. Defaults - * to true. */ - extended?: boolean; - /** Globstar syntax. - * See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option. - * If false, `**` is treated like `*`. Defaults to true. */ - globstar?: boolean; - /** Operating system. Defaults to the native OS. */ - os?: typeof Deno.build.os; -} - -export type GlobToRegExpOptions = GlobOptions; - -// deno-fmt-ignore -const regExpEscapeChars = ["!", "$", "(", ")", "*", "+", ".", "=", "?", "[", "\\", "^", "{", "|"]; -const rangeEscapeChars = ["-", "\\", "]"]; - -/** Convert a glob string to a regular expression. - * - * Tries to match bash glob expansion as closely as possible. - * - * Basic glob syntax: - * - `*` - Matches everything without leaving the path segment. - * - `{foo,bar}` - Matches `foo` or `bar`. - * - `[abcd]` - Matches `a`, `b`, `c` or `d`. - * - `[a-d]` - Matches `a`, `b`, `c` or `d`. - * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`. - * - `[[::]]` - Matches any character belonging to ``. - * - `[[:alnum:]]` - Matches any digit or letter. - * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`. - * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes - * for a complete list of supported character classes. - * - `\` - Escapes the next character for an `os` other than `"windows"`. - * - \` - Escapes the next character for `os` set to `"windows"`. - * - `/` - Path separator. - * - `\` - Additional path separator only for `os` set to `"windows"`. - * - * Extended syntax: - * - Requires `{ extended: true }`. - * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`. - * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same. - * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`. - * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`. - * - `!(foo|bar)` - Matches anything other than `{foo,bar}`. - * - See https://www.linuxjournal.com/content/bash-extended-globbing. - * - * Globstar syntax: - * - Requires `{ globstar: true }`. - * - `**` - Matches any number of any path segments. - * - Must comprise its entire path segment in the provided glob. - * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option. - * - * Note the following properties: - * - The generated `RegExp` is anchored at both start and end. - * - Repeating and trailing separators are tolerated. Trailing separators in the - * provided glob have no meaning and are discarded. - * - Absolute globs will only match absolute paths, etc. - * - Empty globs will match nothing. - * - Any special glob syntax must be contained to one path segment. For example, - * `?(foo|bar/baz)` is invalid. The separator will take precendence and the - * first segment ends with an unclosed group. - * - If a path segment ends with unclosed groups or a dangling escape prefix, a - * parse error has occured. Every character for that segment is taken - * literally in this event. - * - * Limitations: - * - A negative group like `!(foo|bar)` will wrongly be converted to a negative - * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly - * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively, - * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if - * the group occurs not nested at the end of the segment. */ -export function globToRegExp( - glob: string, - { extended = true, globstar: globstarOption = true, os = osType }: - GlobToRegExpOptions = {}, -): RegExp { - if (glob == "") { - return /(?!)/; - } - - const sep = os == "windows" ? "(?:\\\\|/)+" : "/+"; - const sepMaybe = os == "windows" ? "(?:\\\\|/)*" : "/*"; - const seps = os == "windows" ? ["\\", "/"] : ["/"]; - const globstar = os == "windows" - ? "(?:[^\\\\/]*(?:\\\\|/|$)+)*" - : "(?:[^/]*(?:/|$)+)*"; - const wildcard = os == "windows" ? "[^\\\\/]*" : "[^/]*"; - const escapePrefix = os == "windows" ? "`" : "\\"; - - // Remove trailing separators. - let newLength = glob.length; - for (; newLength > 1 && seps.includes(glob[newLength - 1]); newLength--); - glob = glob.slice(0, newLength); - - let regExpString = ""; - - // Terminates correctly. Trust that `j` is incremented every iteration. - for (let j = 0; j < glob.length;) { - let segment = ""; - const groupStack = []; - let inRange = false; - let inEscape = false; - let endsWithSep = false; - let i = j; - - // Terminates with `i` at the non-inclusive end of the current segment. - for (; i < glob.length && !seps.includes(glob[i]); i++) { - if (inEscape) { - inEscape = false; - const escapeChars = inRange ? rangeEscapeChars : regExpEscapeChars; - segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; - continue; - } - - if (glob[i] == escapePrefix) { - inEscape = true; - continue; - } - - if (glob[i] == "[") { - if (!inRange) { - inRange = true; - segment += "["; - if (glob[i + 1] == "!") { - i++; - segment += "^"; - } else if (glob[i + 1] == "^") { - i++; - segment += "\\^"; - } - continue; - } else if (glob[i + 1] == ":") { - let k = i + 1; - let value = ""; - while (glob[k + 1] != null && glob[k + 1] != ":") { - value += glob[k + 1]; - k++; - } - if (glob[k + 1] == ":" && glob[k + 2] == "]") { - i = k + 2; - if (value == "alnum") segment += "\\dA-Za-z"; - else if (value == "alpha") segment += "A-Za-z"; - else if (value == "ascii") segment += "\x00-\x7F"; - else if (value == "blank") segment += "\t "; - else if (value == "cntrl") segment += "\x00-\x1F\x7F"; - else if (value == "digit") segment += "\\d"; - else if (value == "graph") segment += "\x21-\x7E"; - else if (value == "lower") segment += "a-z"; - else if (value == "print") segment += "\x20-\x7E"; - else if (value == "punct") { - segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~"; - } else if (value == "space") segment += "\\s\v"; - else if (value == "upper") segment += "A-Z"; - else if (value == "word") segment += "\\w"; - else if (value == "xdigit") segment += "\\dA-Fa-f"; - continue; - } - } - } - - if (glob[i] == "]" && inRange) { - inRange = false; - segment += "]"; - continue; - } - - if (inRange) { - if (glob[i] == "\\") { - segment += `\\\\`; - } else { - segment += glob[i]; - } - continue; - } - - if ( - glob[i] == ")" && groupStack.length > 0 && - groupStack[groupStack.length - 1] != "BRACE" - ) { - segment += ")"; - const type = groupStack.pop()!; - if (type == "!") { - segment += wildcard; - } else if (type != "@") { - segment += type; - } - continue; - } - - if ( - glob[i] == "|" && groupStack.length > 0 && - groupStack[groupStack.length - 1] != "BRACE" - ) { - segment += "|"; - continue; - } - - if (glob[i] == "+" && extended && glob[i + 1] == "(") { - i++; - groupStack.push("+"); - segment += "(?:"; - continue; - } - - if (glob[i] == "@" && extended && glob[i + 1] == "(") { - i++; - groupStack.push("@"); - segment += "(?:"; - continue; - } - - if (glob[i] == "?") { - if (extended && glob[i + 1] == "(") { - i++; - groupStack.push("?"); - segment += "(?:"; - } else { - segment += "."; - } - continue; - } - - if (glob[i] == "!" && extended && glob[i + 1] == "(") { - i++; - groupStack.push("!"); - segment += "(?!"; - continue; - } - - if (glob[i] == "{") { - groupStack.push("BRACE"); - segment += "(?:"; - continue; - } - - if (glob[i] == "}" && groupStack[groupStack.length - 1] == "BRACE") { - groupStack.pop(); - segment += ")"; - continue; - } - - if (glob[i] == "," && groupStack[groupStack.length - 1] == "BRACE") { - segment += "|"; - continue; - } - - if (glob[i] == "*") { - if (extended && glob[i + 1] == "(") { - i++; - groupStack.push("*"); - segment += "(?:"; - } else { - const prevChar = glob[i - 1]; - let numStars = 1; - while (glob[i + 1] == "*") { - i++; - numStars++; - } - const nextChar = glob[i + 1]; - if ( - globstarOption && numStars == 2 && - [...seps, undefined].includes(prevChar) && - [...seps, undefined].includes(nextChar) - ) { - segment += globstar; - endsWithSep = true; - } else { - segment += wildcard; - } - } - continue; - } - - segment += regExpEscapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; - } - - // Check for unclosed groups or a dangling backslash. - if (groupStack.length > 0 || inRange || inEscape) { - // Parse failure. Take all characters from this segment literally. - segment = ""; - for (const c of glob.slice(j, i)) { - segment += regExpEscapeChars.includes(c) ? `\\${c}` : c; - endsWithSep = false; - } - } - - regExpString += segment; - if (!endsWithSep) { - regExpString += i < glob.length ? sep : sepMaybe; - endsWithSep = true; - } - - // Terminates with `i` at the start of the next segment. - while (seps.includes(glob[i])) i++; - - // Check that the next value of `j` is indeed higher than the current value. - if (!(i > j)) { - throw new Error("Assertion failure: i > j (potential infinite loop)"); - } - j = i; - } - - regExpString = `^${regExpString}$`; - return new RegExp(regExpString); -} - -/** Test whether the given string is a glob */ -export function isGlob(str: string): boolean { - const chars: Record = { "{": "}", "(": ")", "[": "]" }; - const regex = - /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; - - if (str === "") { - return false; - } - - let match: RegExpExecArray | null; - - while ((match = regex.exec(str))) { - if (match[2]) return true; - let idx = match.index + match[0].length; - - // if an open bracket/brace/paren is escaped, - // set the index to the next closing character - const open = match[1]; - const close = open ? chars[open] : null; - if (open && close) { - const n = str.indexOf(close, idx); - if (n !== -1) { - idx = n + 1; - } - } - - str = str.slice(idx); - } - - return false; -} - -/** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */ -export function normalizeGlob( - glob: string, - { globstar = false }: GlobOptions = {}, -): string { - if (glob.match(/\0/g)) { - throw new Error(`Glob contains invalid characters: "${glob}"`); - } - if (!globstar) { - return normalize(glob); - } - const s = SEP_PATTERN.source; - const badParentPattern = new RegExp( - `(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, - "g", - ); - return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, ".."); -} - -/** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */ -export function joinGlobs( - globs: string[], - { extended = false, globstar = false }: GlobOptions = {}, -): string { - if (!globstar || globs.length == 0) { - return join(...globs); - } - if (globs.length === 0) return "."; - let joined: string | undefined; - for (const glob of globs) { - const path = glob; - if (path.length > 0) { - if (!joined) joined = path; - else joined += `${SEP}${path}`; - } - } - if (!joined) return "."; - return normalizeGlob(joined, { extended, globstar }); -} diff --git a/src/resources/vendor/deno-land/std@0-91-0/path/mod.ts b/src/resources/vendor/deno-land/std@0-91-0/path/mod.ts deleted file mode 100644 index 5fd793c75ad..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/path/mod.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright the Browserify authors. MIT License. -// Ported mostly from https://github.com/browserify/path-browserify/ -// This module is browser compatible. - -import { isWindows } from "../_util/os.ts"; -import * as _win32 from "./win32.ts"; -import * as _posix from "./posix.ts"; - -const path = isWindows ? _win32 : _posix; - -export const win32 = _win32; -export const posix = _posix; -export const { - basename, - delimiter, - dirname, - extname, - format, - fromFileUrl, - isAbsolute, - join, - normalize, - parse, - relative, - resolve, - sep, - toFileUrl, - toNamespacedPath, -} = path; - -export * from "./common.ts"; -export { SEP, SEP_PATTERN } from "./separator.ts"; -export * from "./_interface.ts"; -export * from "./glob.ts"; diff --git a/src/resources/vendor/deno-land/std@0-91-0/path/posix.ts b/src/resources/vendor/deno-land/std@0-91-0/path/posix.ts deleted file mode 100644 index dd5777c23f2..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/path/posix.ts +++ /dev/null @@ -1,507 +0,0 @@ -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. - -import type { FormatInputPathObject, ParsedPath } from "./_interface.ts"; -import { CHAR_DOT, CHAR_FORWARD_SLASH } from "./_constants.ts"; - -import { - _format, - assertPath, - encodeWhitespace, - isPosixPathSeparator, - normalizeString, -} from "./_util.ts"; - -export const sep = "/"; -export const delimiter = ":"; - -// path.resolve([from ...], to) -/** - * Resolves `pathSegments` into an absolute path. - * @param pathSegments an array of path segments - */ -export function resolve(...pathSegments: string[]): string { - let resolvedPath = ""; - let resolvedAbsolute = false; - - for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - let path: string; - - if (i >= 0) path = pathSegments[i]; - else { - if (globalThis.Deno == null) { - throw new TypeError("Resolved a relative path without a CWD."); - } - path = Deno.cwd(); - } - - assertPath(path); - - // Skip empty entries - if (path.length === 0) { - continue; - } - - resolvedPath = `${path}/${resolvedPath}`; - resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeString( - resolvedPath, - !resolvedAbsolute, - "/", - isPosixPathSeparator, - ); - - if (resolvedAbsolute) { - if (resolvedPath.length > 0) return `/${resolvedPath}`; - else return "/"; - } else if (resolvedPath.length > 0) return resolvedPath; - else return "."; -} - -/** - * Normalize the `path`, resolving `'..'` and `'.'` segments. - * @param path to be normalized - */ -export function normalize(path: string): string { - assertPath(path); - - if (path.length === 0) return "."; - - const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - const trailingSeparator = - path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH; - - // Normalize the path - path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator); - - if (path.length === 0 && !isAbsolute) path = "."; - if (path.length > 0 && trailingSeparator) path += "/"; - - if (isAbsolute) return `/${path}`; - return path; -} - -/** - * Verifies whether provided path is absolute - * @param path to be verified as absolute - */ -export function isAbsolute(path: string): boolean { - assertPath(path); - return path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH; -} - -/** - * Join all given a sequence of `paths`,then normalizes the resulting path. - * @param paths to be joined and normalized - */ -export function join(...paths: string[]): string { - if (paths.length === 0) return "."; - let joined: string | undefined; - for (let i = 0, len = paths.length; i < len; ++i) { - const path = paths[i]; - assertPath(path); - if (path.length > 0) { - if (!joined) joined = path; - else joined += `/${path}`; - } - } - if (!joined) return "."; - return normalize(joined); -} - -/** - * Return the relative path from `from` to `to` based on current working directory. - * @param from path in current working directory - * @param to path in current working directory - */ -export function relative(from: string, to: string): string { - assertPath(from); - assertPath(to); - - if (from === to) return ""; - - from = resolve(from); - to = resolve(to); - - if (from === to) return ""; - - // Trim any leading backslashes - let fromStart = 1; - const fromEnd = from.length; - for (; fromStart < fromEnd; ++fromStart) { - if (from.charCodeAt(fromStart) !== CHAR_FORWARD_SLASH) break; - } - const fromLen = fromEnd - fromStart; - - // Trim any leading backslashes - let toStart = 1; - const toEnd = to.length; - for (; toStart < toEnd; ++toStart) { - if (to.charCodeAt(toStart) !== CHAR_FORWARD_SLASH) break; - } - const toLen = toEnd - toStart; - - // Compare paths to find the longest common path from root - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for (; i <= length; ++i) { - if (i === length) { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) { - // We get here if `from` is the exact base path for `to`. - // For example: from='/foo/bar'; to='/foo/bar/baz' - return to.slice(toStart + i + 1); - } else if (i === 0) { - // We get here if `from` is the root - // For example: from='/'; to='/foo' - return to.slice(toStart + i); - } - } else if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) { - // We get here if `to` is the exact base path for `from`. - // For example: from='/foo/bar/baz'; to='/foo/bar' - lastCommonSep = i; - } else if (i === 0) { - // We get here if `to` is the root. - // For example: from='/foo'; to='/' - lastCommonSep = 0; - } - } - break; - } - const fromCode = from.charCodeAt(fromStart + i); - const toCode = to.charCodeAt(toStart + i); - if (fromCode !== toCode) break; - else if (fromCode === CHAR_FORWARD_SLASH) lastCommonSep = i; - } - - let out = ""; - // Generate the relative path based on the path difference between `to` - // and `from` - for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { - if (i === fromEnd || from.charCodeAt(i) === CHAR_FORWARD_SLASH) { - if (out.length === 0) out += ".."; - else out += "/.."; - } - } - - // Lastly, append the rest of the destination (`to`) path that comes after - // the common path parts - if (out.length > 0) return out + to.slice(toStart + lastCommonSep); - else { - toStart += lastCommonSep; - if (to.charCodeAt(toStart) === CHAR_FORWARD_SLASH) ++toStart; - return to.slice(toStart); - } -} - -/** - * Resolves path to a namespace path - * @param path to resolve to namespace - */ -export function toNamespacedPath(path: string): string { - // Non-op on posix systems - return path; -} - -/** - * Return the directory name of a `path`. - * @param path to determine name for - */ -export function dirname(path: string): string { - assertPath(path); - if (path.length === 0) return "."; - const hasRoot = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - let end = -1; - let matchedSlash = true; - for (let i = path.length - 1; i >= 1; --i) { - if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - - if (end === -1) return hasRoot ? "/" : "."; - if (hasRoot && end === 1) return "//"; - return path.slice(0, end); -} - -/** - * Return the last portion of a `path`. Trailing directory separators are ignored. - * @param path to process - * @param ext of path directory - */ -export function basename(path: string, ext = ""): string { - if (ext !== undefined && typeof ext !== "string") { - throw new TypeError('"ext" argument must be a string'); - } - assertPath(path); - - let start = 0; - let end = -1; - let matchedSlash = true; - let i: number; - - if (ext !== undefined && ext.length > 0 && ext.length <= path.length) { - if (ext.length === path.length && ext === path) return ""; - let extIdx = ext.length - 1; - let firstNonSlashEnd = -1; - for (i = path.length - 1; i >= 0; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } else { - if (firstNonSlashEnd === -1) { - // We saw the first non-path separator, remember this index in case - // we need it if the extension ends up not matching - matchedSlash = false; - firstNonSlashEnd = i + 1; - } - if (extIdx >= 0) { - // Try to match the explicit extension - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - // We matched the extension, so mark this as the end of our path - // component - end = i; - } - } else { - // Extension does not match, so our result is the entire path - // component - extIdx = -1; - end = firstNonSlashEnd; - } - } - } - } - - if (start === end) end = firstNonSlashEnd; - else if (end === -1) end = path.length; - return path.slice(start, end); - } else { - for (i = path.length - 1; i >= 0; --i) { - if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } else if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // path component - matchedSlash = false; - end = i + 1; - } - } - - if (end === -1) return ""; - return path.slice(start, end); - } -} - -/** - * Return the extension of the `path`. - * @param path with extension - */ -export function extname(path: string): string { - assertPath(path); - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - for (let i = path.length - 1; i >= 0; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - - if ( - startDot === -1 || - end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) - ) { - return ""; - } - return path.slice(startDot, end); -} - -/** - * Generate a path from `FormatInputPathObject` object. - * @param pathObject with path - */ -export function format(pathObject: FormatInputPathObject): string { - if (pathObject === null || typeof pathObject !== "object") { - throw new TypeError( - `The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`, - ); - } - return _format("/", pathObject); -} - -/** - * Return a `ParsedPath` object of the `path`. - * @param path to process - */ -export function parse(path: string): ParsedPath { - assertPath(path); - - const ret: ParsedPath = { root: "", dir: "", base: "", ext: "", name: "" }; - if (path.length === 0) return ret; - const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - let start: number; - if (isAbsolute) { - ret.root = "/"; - start = 1; - } else { - start = 0; - } - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - - // Get non-dir info - for (; i >= start; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - - if ( - startDot === -1 || - end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) - ) { - if (end !== -1) { - if (startPart === 0 && isAbsolute) { - ret.base = ret.name = path.slice(1, end); - } else { - ret.base = ret.name = path.slice(startPart, end); - } - } - } else { - if (startPart === 0 && isAbsolute) { - ret.name = path.slice(1, startDot); - ret.base = path.slice(1, end); - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - } - ret.ext = path.slice(startDot, end); - } - - if (startPart > 0) ret.dir = path.slice(0, startPart - 1); - else if (isAbsolute) ret.dir = "/"; - - return ret; -} - -/** - * Converts a file URL to a path string. - * - * fromFileUrl("file:///home/foo"); // "/home/foo" - * @param url of a file URL - */ -export function fromFileUrl(url: string | URL): string { - url = url instanceof URL ? url : new URL(url); - if (url.protocol != "file:") { - throw new TypeError("Must be a file URL."); - } - return decodeURIComponent( - url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"), - ); -} - -/** - * Converts a path string to a file URL. - * - * toFileUrl("/home/foo"); // new URL("file:///home/foo") - * @param path to convert to file URL - */ -export function toFileUrl(path: string): URL { - if (!isAbsolute(path)) { - throw new TypeError("Must be an absolute path."); - } - const url = new URL("file:///"); - url.pathname = encodeWhitespace( - path.replace(/%/g, "%25").replace(/\\/g, "%5C"), - ); - return url; -} diff --git a/src/resources/vendor/deno-land/std@0-91-0/path/separator.ts b/src/resources/vendor/deno-land/std@0-91-0/path/separator.ts deleted file mode 100644 index d897e07e681..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/path/separator.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// This module is browser compatible. - -import { isWindows } from "../_util/os.ts"; - -export const SEP = isWindows ? "\\" : "/"; -export const SEP_PATTERN = isWindows ? /[\\/]+/ : /\/+/; diff --git a/src/resources/vendor/deno-land/std@0-91-0/path/win32.ts b/src/resources/vendor/deno-land/std@0-91-0/path/win32.ts deleted file mode 100644 index 3afafd1f28b..00000000000 --- a/src/resources/vendor/deno-land/std@0-91-0/path/win32.ts +++ /dev/null @@ -1,1002 +0,0 @@ -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. - -import type { FormatInputPathObject, ParsedPath } from "./_interface.ts"; -import { - CHAR_BACKWARD_SLASH, - CHAR_COLON, - CHAR_DOT, - CHAR_QUESTION_MARK, -} from "./_constants.ts"; - -import { - _format, - assertPath, - encodeWhitespace, - isPathSeparator, - isWindowsDeviceRoot, - normalizeString, -} from "./_util.ts"; -import { assert } from "../_util/assert.ts"; - -export const sep = "\\"; -export const delimiter = ";"; - -/** - * Resolves path segments into a `path` - * @param pathSegments to process to path - */ -export function resolve(...pathSegments: string[]): string { - let resolvedDevice = ""; - let resolvedTail = ""; - let resolvedAbsolute = false; - - for (let i = pathSegments.length - 1; i >= -1; i--) { - let path: string; - if (i >= 0) { - path = pathSegments[i]; - } else if (!resolvedDevice) { - if (globalThis.Deno == null) { - throw new TypeError("Resolved a drive-letter-less path without a CWD."); - } - path = Deno.cwd(); - } else { - if (globalThis.Deno == null) { - throw new TypeError("Resolved a relative path without a CWD."); - } - // Windows has the concept of drive-specific current working - // directories. If we've resolved a drive letter but not yet an - // absolute path, get cwd for that drive, or the process cwd if - // the drive cwd is not available. We're sure the device is not - // a UNC path at this points, because UNC paths are always absolute. - path = Deno.env.get(`=${resolvedDevice}`) || Deno.cwd(); - - // Verify that a cwd was found and that it actually points - // to our drive. If not, default to the drive's root. - if ( - path === undefined || - path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\` - ) { - path = `${resolvedDevice}\\`; - } - } - - assertPath(path); - - const len = path.length; - - // Skip empty entries - if (len === 0) continue; - - let rootEnd = 0; - let device = ""; - let isAbsolute = false; - const code = path.charCodeAt(0); - - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - - // If we started with a separator, we know we at least have an - // absolute path of some kind (UNC or otherwise) - isAbsolute = true; - - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - // Matched! - last = j; - // Match 1 or more path separators - for (; j < len; ++j) { - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - device = `\\\\${firstPart}\\${path.slice(last)}`; - rootEnd = j; - } else if (j !== last) { - // We matched a UNC root with leftovers - - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } else { - rootEnd = 1; - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - - if (path.charCodeAt(1) === CHAR_COLON) { - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) { - // Treat separator following drive name as an absolute path - // indicator - isAbsolute = true; - rootEnd = 3; - } - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator - rootEnd = 1; - isAbsolute = true; - } - - if ( - device.length > 0 && - resolvedDevice.length > 0 && - device.toLowerCase() !== resolvedDevice.toLowerCase() - ) { - // This path points to another device so it is not applicable - continue; - } - - if (resolvedDevice.length === 0 && device.length > 0) { - resolvedDevice = device; - } - if (!resolvedAbsolute) { - resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`; - resolvedAbsolute = isAbsolute; - } - - if (resolvedAbsolute && resolvedDevice.length > 0) break; - } - - // At this point the path should be resolved to a full absolute path, - // but handle relative paths to be safe (might happen when process.cwd() - // fails) - - // Normalize the tail path - resolvedTail = normalizeString( - resolvedTail, - !resolvedAbsolute, - "\\", - isPathSeparator, - ); - - return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || "."; -} - -/** - * Normalizes a `path` - * @param path to normalize - */ -export function normalize(path: string): string { - assertPath(path); - const len = path.length; - if (len === 0) return "."; - let rootEnd = 0; - let device: string | undefined; - let isAbsolute = false; - const code = path.charCodeAt(0); - - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - - // If we started with a separator, we know we at least have an absolute - // path of some kind (UNC or otherwise) - isAbsolute = true; - - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - // Matched! - last = j; - // Match 1 or more path separators - for (; j < len; ++j) { - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - // Return the normalized version of the UNC root since there - // is nothing left to process - - return `\\\\${firstPart}\\${path.slice(last)}\\`; - } else if (j !== last) { - // We matched a UNC root with leftovers - - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } else { - rootEnd = 1; - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - - if (path.charCodeAt(1) === CHAR_COLON) { - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) { - // Treat separator following drive name as an absolute path - // indicator - isAbsolute = true; - rootEnd = 3; - } - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator, exit early to avoid unnecessary - // work - return "\\"; - } - - let tail: string; - if (rootEnd < len) { - tail = normalizeString( - path.slice(rootEnd), - !isAbsolute, - "\\", - isPathSeparator, - ); - } else { - tail = ""; - } - if (tail.length === 0 && !isAbsolute) tail = "."; - if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) { - tail += "\\"; - } - if (device === undefined) { - if (isAbsolute) { - if (tail.length > 0) return `\\${tail}`; - else return "\\"; - } else if (tail.length > 0) { - return tail; - } else { - return ""; - } - } else if (isAbsolute) { - if (tail.length > 0) return `${device}\\${tail}`; - else return `${device}\\`; - } else if (tail.length > 0) { - return device + tail; - } else { - return device; - } -} - -/** - * Verifies whether path is absolute - * @param path to verify - */ -export function isAbsolute(path: string): boolean { - assertPath(path); - const len = path.length; - if (len === 0) return false; - - const code = path.charCodeAt(0); - if (isPathSeparator(code)) { - return true; - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - - if (len > 2 && path.charCodeAt(1) === CHAR_COLON) { - if (isPathSeparator(path.charCodeAt(2))) return true; - } - } - return false; -} - -/** - * Join all given a sequence of `paths`,then normalizes the resulting path. - * @param paths to be joined and normalized - */ -export function join(...paths: string[]): string { - const pathsCount = paths.length; - if (pathsCount === 0) return "."; - - let joined: string | undefined; - let firstPart: string | null = null; - for (let i = 0; i < pathsCount; ++i) { - const path = paths[i]; - assertPath(path); - if (path.length > 0) { - if (joined === undefined) joined = firstPart = path; - else joined += `\\${path}`; - } - } - - if (joined === undefined) return "."; - - // Make sure that the joined path doesn't start with two slashes, because - // normalize() will mistake it for an UNC path then. - // - // This step is skipped when it is very clear that the user actually - // intended to point at an UNC path. This is assumed when the first - // non-empty string arguments starts with exactly two slashes followed by - // at least one more non-slash character. - // - // Note that for normalize() to treat a path as an UNC path it needs to - // have at least 2 components, so we don't filter for that here. - // This means that the user can use join to construct UNC paths from - // a server name and a share name; for example: - // path.join('//server', 'share') -> '\\\\server\\share\\') - let needsReplace = true; - let slashCount = 0; - assert(firstPart != null); - if (isPathSeparator(firstPart.charCodeAt(0))) { - ++slashCount; - const firstLen = firstPart.length; - if (firstLen > 1) { - if (isPathSeparator(firstPart.charCodeAt(1))) { - ++slashCount; - if (firstLen > 2) { - if (isPathSeparator(firstPart.charCodeAt(2))) ++slashCount; - else { - // We matched a UNC path in the first part - needsReplace = false; - } - } - } - } - } - if (needsReplace) { - // Find any more consecutive slashes we need to replace - for (; slashCount < joined.length; ++slashCount) { - if (!isPathSeparator(joined.charCodeAt(slashCount))) break; - } - - // Replace the slashes if needed - if (slashCount >= 2) joined = `\\${joined.slice(slashCount)}`; - } - - return normalize(joined); -} - -/** - * It will solve the relative path from `from` to `to`, for instance: - * from = 'C:\\orandea\\test\\aaa' - * to = 'C:\\orandea\\impl\\bbb' - * The output of the function should be: '..\\..\\impl\\bbb' - * @param from relative path - * @param to relative path - */ -export function relative(from: string, to: string): string { - assertPath(from); - assertPath(to); - - if (from === to) return ""; - - const fromOrig = resolve(from); - const toOrig = resolve(to); - - if (fromOrig === toOrig) return ""; - - from = fromOrig.toLowerCase(); - to = toOrig.toLowerCase(); - - if (from === to) return ""; - - // Trim any leading backslashes - let fromStart = 0; - let fromEnd = from.length; - for (; fromStart < fromEnd; ++fromStart) { - if (from.charCodeAt(fromStart) !== CHAR_BACKWARD_SLASH) break; - } - // Trim trailing backslashes (applicable to UNC paths only) - for (; fromEnd - 1 > fromStart; --fromEnd) { - if (from.charCodeAt(fromEnd - 1) !== CHAR_BACKWARD_SLASH) break; - } - const fromLen = fromEnd - fromStart; - - // Trim any leading backslashes - let toStart = 0; - let toEnd = to.length; - for (; toStart < toEnd; ++toStart) { - if (to.charCodeAt(toStart) !== CHAR_BACKWARD_SLASH) break; - } - // Trim trailing backslashes (applicable to UNC paths only) - for (; toEnd - 1 > toStart; --toEnd) { - if (to.charCodeAt(toEnd - 1) !== CHAR_BACKWARD_SLASH) break; - } - const toLen = toEnd - toStart; - - // Compare paths to find the longest common path from root - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for (; i <= length; ++i) { - if (i === length) { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) { - // We get here if `from` is the exact base path for `to`. - // For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz' - return toOrig.slice(toStart + i + 1); - } else if (i === 2) { - // We get here if `from` is the device root. - // For example: from='C:\\'; to='C:\\foo' - return toOrig.slice(toStart + i); - } - } - if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) { - // We get here if `to` is the exact base path for `from`. - // For example: from='C:\\foo\\bar'; to='C:\\foo' - lastCommonSep = i; - } else if (i === 2) { - // We get here if `to` is the device root. - // For example: from='C:\\foo\\bar'; to='C:\\' - lastCommonSep = 3; - } - } - break; - } - const fromCode = from.charCodeAt(fromStart + i); - const toCode = to.charCodeAt(toStart + i); - if (fromCode !== toCode) break; - else if (fromCode === CHAR_BACKWARD_SLASH) lastCommonSep = i; - } - - // We found a mismatch before the first common path separator was seen, so - // return the original `to`. - if (i !== length && lastCommonSep === -1) { - return toOrig; - } - - let out = ""; - if (lastCommonSep === -1) lastCommonSep = 0; - // Generate the relative path based on the path difference between `to` and - // `from` - for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { - if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) { - if (out.length === 0) out += ".."; - else out += "\\.."; - } - } - - // Lastly, append the rest of the destination (`to`) path that comes after - // the common path parts - if (out.length > 0) { - return out + toOrig.slice(toStart + lastCommonSep, toEnd); - } else { - toStart += lastCommonSep; - if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) ++toStart; - return toOrig.slice(toStart, toEnd); - } -} - -/** - * Resolves path to a namespace path - * @param path to resolve to namespace - */ -export function toNamespacedPath(path: string): string { - // Note: this will *probably* throw somewhere. - if (typeof path !== "string") return path; - if (path.length === 0) return ""; - - const resolvedPath = resolve(path); - - if (resolvedPath.length >= 3) { - if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) { - // Possible UNC root - - if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) { - const code = resolvedPath.charCodeAt(2); - if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) { - // Matched non-long UNC root, convert the path to a long UNC path - return `\\\\?\\UNC\\${resolvedPath.slice(2)}`; - } - } - } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0))) { - // Possible device root - - if ( - resolvedPath.charCodeAt(1) === CHAR_COLON && - resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH - ) { - // Matched device root, convert the path to a long UNC path - return `\\\\?\\${resolvedPath}`; - } - } - } - - return path; -} - -/** - * Return the directory name of a `path`. - * @param path to determine name for - */ -export function dirname(path: string): string { - assertPath(path); - const len = path.length; - if (len === 0) return "."; - let rootEnd = -1; - let end = -1; - let matchedSlash = true; - let offset = 0; - const code = path.charCodeAt(0); - - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - - rootEnd = offset = 1; - - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more path separators - for (; j < len; ++j) { - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - return path; - } - if (j !== last) { - // We matched a UNC root with leftovers - - // Offset by 1 to include the separator after the UNC root to - // treat it as a "normal root" on top of a (UNC) root - rootEnd = offset = j + 1; - } - } - } - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - - if (path.charCodeAt(1) === CHAR_COLON) { - rootEnd = offset = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) rootEnd = offset = 3; - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator, exit early to avoid - // unnecessary work - return path; - } - - for (let i = len - 1; i >= offset; --i) { - if (isPathSeparator(path.charCodeAt(i))) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - - if (end === -1) { - if (rootEnd === -1) return "."; - else end = rootEnd; - } - return path.slice(0, end); -} - -/** - * Return the last portion of a `path`. Trailing directory separators are ignored. - * @param path to process - * @param ext of path directory - */ -export function basename(path: string, ext = ""): string { - if (ext !== undefined && typeof ext !== "string") { - throw new TypeError('"ext" argument must be a string'); - } - - assertPath(path); - - let start = 0; - let end = -1; - let matchedSlash = true; - let i: number; - - // Check for a drive letter prefix so as not to mistake the following - // path separator as an extra separator at the end of the path that can be - // disregarded - if (path.length >= 2) { - const drive = path.charCodeAt(0); - if (isWindowsDeviceRoot(drive)) { - if (path.charCodeAt(1) === CHAR_COLON) start = 2; - } - } - - if (ext !== undefined && ext.length > 0 && ext.length <= path.length) { - if (ext.length === path.length && ext === path) return ""; - let extIdx = ext.length - 1; - let firstNonSlashEnd = -1; - for (i = path.length - 1; i >= start; --i) { - const code = path.charCodeAt(i); - if (isPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } else { - if (firstNonSlashEnd === -1) { - // We saw the first non-path separator, remember this index in case - // we need it if the extension ends up not matching - matchedSlash = false; - firstNonSlashEnd = i + 1; - } - if (extIdx >= 0) { - // Try to match the explicit extension - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - // We matched the extension, so mark this as the end of our path - // component - end = i; - } - } else { - // Extension does not match, so our result is the entire path - // component - extIdx = -1; - end = firstNonSlashEnd; - } - } - } - } - - if (start === end) end = firstNonSlashEnd; - else if (end === -1) end = path.length; - return path.slice(start, end); - } else { - for (i = path.length - 1; i >= start; --i) { - if (isPathSeparator(path.charCodeAt(i))) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } else if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // path component - matchedSlash = false; - end = i + 1; - } - } - - if (end === -1) return ""; - return path.slice(start, end); - } -} - -/** - * Return the extension of the `path`. - * @param path with extension - */ -export function extname(path: string): string { - assertPath(path); - let start = 0; - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - - // Check for a drive letter prefix so as not to mistake the following - // path separator as an extra separator at the end of the path that can be - // disregarded - - if ( - path.length >= 2 && - path.charCodeAt(1) === CHAR_COLON && - isWindowsDeviceRoot(path.charCodeAt(0)) - ) { - start = startPart = 2; - } - - for (let i = path.length - 1; i >= start; --i) { - const code = path.charCodeAt(i); - if (isPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - - if ( - startDot === -1 || - end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) - ) { - return ""; - } - return path.slice(startDot, end); -} - -/** - * Generate a path from `FormatInputPathObject` object. - * @param pathObject with path - */ -export function format(pathObject: FormatInputPathObject): string { - if (pathObject === null || typeof pathObject !== "object") { - throw new TypeError( - `The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`, - ); - } - return _format("\\", pathObject); -} - -/** - * Return a `ParsedPath` object of the `path`. - * @param path to process - */ -export function parse(path: string): ParsedPath { - assertPath(path); - - const ret: ParsedPath = { root: "", dir: "", base: "", ext: "", name: "" }; - - const len = path.length; - if (len === 0) return ret; - - let rootEnd = 0; - let code = path.charCodeAt(0); - - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - - rootEnd = 1; - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more path separators - for (; j < len; ++j) { - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - - rootEnd = j; - } else if (j !== last) { - // We matched a UNC root with leftovers - - rootEnd = j + 1; - } - } - } - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - - if (path.charCodeAt(1) === CHAR_COLON) { - rootEnd = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) { - if (len === 3) { - // `path` contains just a drive root, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - return ret; - } - rootEnd = 3; - } - } else { - // `path` contains just a drive root, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - return ret; - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - return ret; - } - - if (rootEnd > 0) ret.root = path.slice(0, rootEnd); - - let startDot = -1; - let startPart = rootEnd; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - - // Get non-dir info - for (; i >= rootEnd; --i) { - code = path.charCodeAt(i); - if (isPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - - if ( - startDot === -1 || - end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) - ) { - if (end !== -1) { - ret.base = ret.name = path.slice(startPart, end); - } - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - ret.ext = path.slice(startDot, end); - } - - // If the directory is the root, use the entire root as the `dir` including - // the trailing slash if any (`C:\abc` -> `C:\`). Otherwise, strip out the - // trailing slash (`C:\abc\def` -> `C:\abc`). - if (startPart > 0 && startPart !== rootEnd) { - ret.dir = path.slice(0, startPart - 1); - } else ret.dir = ret.root; - - return ret; -} - -/** - * Converts a file URL to a path string. - * - * fromFileUrl("file:///home/foo"); // "\\home\\foo" - * fromFileUrl("file:///C:/Users/foo"); // "C:\\Users\\foo" - * fromFileUrl("file://localhost/home/foo"); // "\\\\localhost\\home\\foo" - * @param url of a file URL - */ -export function fromFileUrl(url: string | URL): string { - url = url instanceof URL ? url : new URL(url); - if (url.protocol != "file:") { - throw new TypeError("Must be a file URL."); - } - let path = decodeURIComponent( - url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25"), - ).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\"); - if (url.hostname != "") { - // Note: The `URL` implementation guarantees that the drive letter and - // hostname are mutually exclusive. Otherwise it would not have been valid - // to append the hostname and path like this. - path = `\\\\${url.hostname}${path}`; - } - return path; -} - -/** - * Converts a path string to a file URL. - * - * toFileUrl("\\home\\foo"); // new URL("file:///home/foo") - * toFileUrl("C:\\Users\\foo"); // new URL("file:///C:/Users/foo") - * toFileUrl("\\\\127.0.0.1\\home\\foo"); // new URL("file://127.0.0.1/home/foo") - * @param path to convert to file URL - */ -export function toFileUrl(path: string): URL { - if (!isAbsolute(path)) { - throw new TypeError("Must be an absolute path."); - } - const [, hostname, pathname] = path.match( - /^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/, - )!; - const url = new URL("file:///"); - url.pathname = encodeWhitespace(pathname.replace(/%/g, "%25")); - if (hostname != null && hostname != "localhost") { - url.hostname = hostname; - if (!url.hostname) { - throw new TypeError("Invalid hostname."); - } - } - return url; -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/_util/assert.ts b/src/resources/vendor/deno-land/std@0-93-0/_util/assert.ts deleted file mode 100644 index 2588190decc..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/_util/assert.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. - -export class DenoStdInternalError extends Error { - constructor(message: string) { - super(message); - this.name = "DenoStdInternalError"; - } -} - -/** Make an assertion, if not `true`, then throw. */ -export function assert(expr: unknown, msg = ""): asserts expr { - if (!expr) { - throw new DenoStdInternalError(msg); - } -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/_util/os.ts b/src/resources/vendor/deno-land/std@0-93-0/_util/os.ts deleted file mode 100644 index 3b56b6d8a11..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/_util/os.ts +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// This module is browser compatible. - -export const osType = (() => { - if (globalThis.Deno != null) { - return Deno.build.os; - } - - // deno-lint-ignore no-explicit-any - const navigator = (globalThis as any).navigator; - if (navigator?.appVersion?.includes?.("Win") ?? false) { - return "windows"; - } - - return "linux"; -})(); - -export const isWindows = osType === "windows"; diff --git a/src/resources/vendor/deno-land/std@0-93-0/bytes/mod.ts b/src/resources/vendor/deno-land/std@0-93-0/bytes/mod.ts deleted file mode 100644 index bb2b7d46ebe..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/bytes/mod.ts +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. - -/** Find first index of binary pattern from source. If not found, then return -1 - * @param source source array - * @param pat pattern to find in source array - * @param start the index to start looking in the source - */ -export function indexOf( - source: Uint8Array, - pat: Uint8Array, - start = 0, -): number { - if (start >= source.length) { - return -1; - } - if (start < 0) { - start = 0; - } - const s = pat[0]; - for (let i = start; i < source.length; i++) { - if (source[i] !== s) continue; - const pin = i; - let matched = 1; - let j = i; - while (matched < pat.length) { - j++; - if (source[j] !== pat[j - pin]) { - break; - } - matched++; - } - if (matched === pat.length) { - return pin; - } - } - return -1; -} - -/** Find last index of binary pattern from source. If not found, then return -1. - * @param source source array - * @param pat pattern to find in source array - * @param start the index to start looking in the source - */ -export function lastIndexOf( - source: Uint8Array, - pat: Uint8Array, - start = source.length - 1, -): number { - if (start < 0) { - return -1; - } - if (start >= source.length) { - start = source.length - 1; - } - const e = pat[pat.length - 1]; - for (let i = start; i >= 0; i--) { - if (source[i] !== e) continue; - const pin = i; - let matched = 1; - let j = i; - while (matched < pat.length) { - j--; - if (source[j] !== pat[pat.length - 1 - (pin - j)]) { - break; - } - matched++; - } - if (matched === pat.length) { - return pin - pat.length + 1; - } - } - return -1; -} - -/** Check whether binary arrays are equal to each other. - * @param a first array to check equality - * @param b second array to check equality - */ -export function equals(a: Uint8Array, b: Uint8Array): boolean { - if (a.length !== b.length) return false; - for (let i = 0; i < b.length; i++) { - if (a[i] !== b[i]) return false; - } - return true; -} - -/** Check whether binary array starts with prefix. - * @param source source array - * @param prefix prefix array to check in source - */ -export function startsWith(source: Uint8Array, prefix: Uint8Array): boolean { - for (let i = 0, max = prefix.length; i < max; i++) { - if (source[i] !== prefix[i]) return false; - } - return true; -} - -/** Check whether binary array ends with suffix. - * @param source source array - * @param suffix suffix array to check in source - */ -export function endsWith(source: Uint8Array, suffix: Uint8Array): boolean { - for ( - let srci = source.length - 1, sfxi = suffix.length - 1; - sfxi >= 0; - srci--, sfxi-- - ) { - if (source[srci] !== suffix[sfxi]) return false; - } - return true; -} - -/** Repeat bytes. returns a new byte slice consisting of `count` copies of `b`. - * @param origin The origin bytes - * @param count The count you want to repeat. - * @throws `RangeError` When count is negative - */ -export function repeat(origin: Uint8Array, count: number): Uint8Array { - if (count === 0) { - return new Uint8Array(); - } - - if (count < 0) { - throw new RangeError("bytes: negative repeat count"); - } else if ((origin.length * count) / count !== origin.length) { - throw new Error("bytes: repeat count causes overflow"); - } - - const int = Math.floor(count); - - if (int !== count) { - throw new Error("bytes: repeat count must be an integer"); - } - - const nb = new Uint8Array(origin.length * count); - - let bp = copy(origin, nb); - - for (; bp < nb.length; bp *= 2) { - copy(nb.slice(0, bp), nb, bp); - } - - return nb; -} - -/** Concatenate multiple binary arrays and return new one. - * @param buf binary arrays to concatenate - */ -export function concat(...buf: Uint8Array[]): Uint8Array { - let length = 0; - for (const b of buf) { - length += b.length; - } - - const output = new Uint8Array(length); - let index = 0; - for (const b of buf) { - output.set(b, index); - index += b.length; - } - - return output; -} - -/** Check source array contains pattern array. - * @param source source array - * @param pat patter array - */ -export function contains(source: Uint8Array, pat: Uint8Array): boolean { - return indexOf(source, pat) != -1; -} - -/** - * Copy bytes from one Uint8Array to another. Bytes from `src` which don't fit - * into `dst` will not be copied. - * - * @param src Source byte array - * @param dst Destination byte array - * @param off Offset into `dst` at which to begin writing values from `src`. - * @return number of bytes copied - */ -export function copy(src: Uint8Array, dst: Uint8Array, off = 0): number { - off = Math.max(0, Math.min(off, dst.byteLength)); - const dstBytesAvailable = dst.byteLength - off; - if (src.byteLength > dstBytesAvailable) { - src = src.subarray(0, dstBytesAvailable); - } - dst.set(src, off); - return src.byteLength; -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/encoding/base64.ts b/src/resources/vendor/deno-land/std@0-93-0/encoding/base64.ts deleted file mode 100644 index 98e3407d859..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/encoding/base64.ts +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. - -// deno-fmt-ignore -const base64abc = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", - "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", - "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", - "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", - "5", "6", "7", "8", "9", "+", "/"]; - -/** - * CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727 - * Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation - * @param data - */ -export function encode(data: ArrayBuffer | string): string { - const uint8 = typeof data === "string" - ? new TextEncoder().encode(data) - : data instanceof Uint8Array - ? data - : new Uint8Array(data); - let result = "", - i; - const l = uint8.length; - for (i = 2; i < l; i += 3) { - result += base64abc[uint8[i - 2] >> 2]; - result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; - result += base64abc[((uint8[i - 1] & 0x0f) << 2) | (uint8[i] >> 6)]; - result += base64abc[uint8[i] & 0x3f]; - } - if (i === l + 1) { - // 1 octet yet to write - result += base64abc[uint8[i - 2] >> 2]; - result += base64abc[(uint8[i - 2] & 0x03) << 4]; - result += "=="; - } - if (i === l) { - // 2 octets yet to write - result += base64abc[uint8[i - 2] >> 2]; - result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; - result += base64abc[(uint8[i - 1] & 0x0f) << 2]; - result += "="; - } - return result; -} - -/** - * Decodes a given RFC4648 base64 encoded string - * @param b64 - */ -export function decode(b64: string): Uint8Array { - const binString = atob(b64); - const size = binString.length; - const bytes = new Uint8Array(size); - for (let i = 0; i < size; i++) { - bytes[i] = binString.charCodeAt(i); - } - return bytes; -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/fmt/printf.ts b/src/resources/vendor/deno-land/std@0-93-0/fmt/printf.ts deleted file mode 100644 index c014b2dc4d9..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/fmt/printf.ts +++ /dev/null @@ -1,757 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -/** - * This implementation is inspired by POSIX and Golang but does not port - * implementation code. */ - -enum State { - PASSTHROUGH, - PERCENT, - POSITIONAL, - PRECISION, - WIDTH, -} - -enum WorP { - WIDTH, - PRECISION, -} - -class Flags { - plus?: boolean; - dash?: boolean; - sharp?: boolean; - space?: boolean; - zero?: boolean; - lessthan?: boolean; - width = -1; - precision = -1; -} - -const min = Math.min; -const UNICODE_REPLACEMENT_CHARACTER = "\ufffd"; -const DEFAULT_PRECISION = 6; -const FLOAT_REGEXP = /(-?)(\d)\.?(\d*)e([+-])(\d+)/; - -enum F { - sign = 1, - mantissa, - fractional, - esign, - exponent, -} - -class Printf { - format: string; - args: unknown[]; - i: number; - - state: State = State.PASSTHROUGH; - verb = ""; - buf = ""; - argNum = 0; - flags: Flags = new Flags(); - - haveSeen: boolean[]; - - // barf, store precision and width errors for later processing ... - tmpError?: string; - - constructor(format: string, ...args: unknown[]) { - this.format = format; - this.args = args; - this.haveSeen = new Array(args.length); - this.i = 0; - } - - doPrintf(): string { - for (; this.i < this.format.length; ++this.i) { - const c = this.format[this.i]; - switch (this.state) { - case State.PASSTHROUGH: - if (c === "%") { - this.state = State.PERCENT; - } else { - this.buf += c; - } - break; - case State.PERCENT: - if (c === "%") { - this.buf += c; - this.state = State.PASSTHROUGH; - } else { - this.handleFormat(); - } - break; - default: - throw Error("Should be unreachable, certainly a bug in the lib."); - } - } - // check for unhandled args - let extras = false; - let err = "%!(EXTRA"; - for (let i = 0; i !== this.haveSeen.length; ++i) { - if (!this.haveSeen[i]) { - extras = true; - err += ` '${Deno.inspect(this.args[i])}'`; - } - } - err += ")"; - if (extras) { - this.buf += err; - } - return this.buf; - } - - // %[]... - handleFormat(): void { - this.flags = new Flags(); - const flags = this.flags; - for (; this.i < this.format.length; ++this.i) { - const c = this.format[this.i]; - switch (this.state) { - case State.PERCENT: - switch (c) { - case "[": - this.handlePositional(); - this.state = State.POSITIONAL; - break; - case "+": - flags.plus = true; - break; - case "<": - flags.lessthan = true; - break; - case "-": - flags.dash = true; - flags.zero = false; // only left pad zeros, dash takes precedence - break; - case "#": - flags.sharp = true; - break; - case " ": - flags.space = true; - break; - case "0": - // only left pad zeros, dash takes precedence - flags.zero = !flags.dash; - break; - default: - if (("1" <= c && c <= "9") || c === "." || c === "*") { - if (c === ".") { - this.flags.precision = 0; - this.state = State.PRECISION; - this.i++; - } else { - this.state = State.WIDTH; - } - this.handleWidthAndPrecision(flags); - } else { - this.handleVerb(); - return; // always end in verb - } - } // switch c - break; - case State.POSITIONAL: - // TODO(bartlomieju): either a verb or * only verb for now - if (c === "*") { - const worp = this.flags.precision === -1 - ? WorP.WIDTH - : WorP.PRECISION; - this.handleWidthOrPrecisionRef(worp); - this.state = State.PERCENT; - break; - } else { - this.handleVerb(); - return; // always end in verb - } - default: - throw new Error(`Should not be here ${this.state}, library bug!`); - } // switch state - } - } - - /** - * Handle width or precision - * @param wOrP - */ - handleWidthOrPrecisionRef(wOrP: WorP): void { - if (this.argNum >= this.args.length) { - // handle Positional should have already taken care of it... - return; - } - const arg = this.args[this.argNum]; - this.haveSeen[this.argNum] = true; - if (typeof arg === "number") { - switch (wOrP) { - case WorP.WIDTH: - this.flags.width = arg; - break; - default: - this.flags.precision = arg; - } - } else { - const tmp = wOrP === WorP.WIDTH ? "WIDTH" : "PREC"; - this.tmpError = `%!(BAD ${tmp} '${this.args[this.argNum]}')`; - } - this.argNum++; - } - - /** - * Handle width and precision - * @param flags - */ - handleWidthAndPrecision(flags: Flags): void { - const fmt = this.format; - for (; this.i !== this.format.length; ++this.i) { - const c = fmt[this.i]; - switch (this.state) { - case State.WIDTH: - switch (c) { - case ".": - // initialize precision, %9.f -> precision=0 - this.flags.precision = 0; - this.state = State.PRECISION; - break; - case "*": - this.handleWidthOrPrecisionRef(WorP.WIDTH); - // force . or flag at this point - break; - default: { - const val = parseInt(c); - // most likely parseInt does something stupid that makes - // it unusable for this scenario ... - // if we encounter a non (number|*|.) we're done with prec & wid - if (isNaN(val)) { - this.i--; - this.state = State.PERCENT; - return; - } - flags.width = flags.width == -1 ? 0 : flags.width; - flags.width *= 10; - flags.width += val; - } - } // switch c - break; - case State.PRECISION: { - if (c === "*") { - this.handleWidthOrPrecisionRef(WorP.PRECISION); - break; - } - const val = parseInt(c); - if (isNaN(val)) { - // one too far, rewind - this.i--; - this.state = State.PERCENT; - return; - } - flags.precision *= 10; - flags.precision += val; - break; - } - default: - throw new Error("can't be here. bug."); - } // switch state - } - } - - /** Handle positional */ - handlePositional(): void { - if (this.format[this.i] !== "[") { - // sanity only - throw new Error("Can't happen? Bug."); - } - let positional = 0; - const format = this.format; - this.i++; - let err = false; - for (; this.i !== this.format.length; ++this.i) { - if (format[this.i] === "]") { - break; - } - positional *= 10; - const val = parseInt(format[this.i]); - if (isNaN(val)) { - //throw new Error( - // `invalid character in positional: ${format}[${format[this.i]}]` - //); - this.tmpError = "%!(BAD INDEX)"; - err = true; - } - positional += val; - } - if (positional - 1 >= this.args.length) { - this.tmpError = "%!(BAD INDEX)"; - err = true; - } - this.argNum = err ? this.argNum : positional - 1; - return; - } - - /** Handle less than */ - handleLessThan(): string { - // deno-lint-ignore no-explicit-any - const arg = this.args[this.argNum] as any; - if ((arg || {}).constructor.name !== "Array") { - throw new Error(`arg ${arg} is not an array. Todo better error handling`); - } - let str = "[ "; - for (let i = 0; i !== arg.length; ++i) { - if (i !== 0) str += ", "; - str += this._handleVerb(arg[i]); - } - return str + " ]"; - } - - /** Handle verb */ - handleVerb(): void { - const verb = this.format[this.i]; - this.verb = verb; - if (this.tmpError) { - this.buf += this.tmpError; - this.tmpError = undefined; - if (this.argNum < this.haveSeen.length) { - this.haveSeen[this.argNum] = true; // keep track of used args - } - } else if (this.args.length <= this.argNum) { - this.buf += `%!(MISSING '${verb}')`; - } else { - const arg = this.args[this.argNum]; // check out of range - this.haveSeen[this.argNum] = true; // keep track of used args - if (this.flags.lessthan) { - this.buf += this.handleLessThan(); - } else { - this.buf += this._handleVerb(arg); - } - } - this.argNum++; // if there is a further positional, it will reset. - this.state = State.PASSTHROUGH; - } - - // deno-lint-ignore no-explicit-any - _handleVerb(arg: any): string { - switch (this.verb) { - case "t": - return this.pad(arg.toString()); - case "b": - return this.fmtNumber(arg as number, 2); - case "c": - return this.fmtNumberCodePoint(arg as number); - case "d": - return this.fmtNumber(arg as number, 10); - case "o": - return this.fmtNumber(arg as number, 8); - case "x": - return this.fmtHex(arg); - case "X": - return this.fmtHex(arg, true); - case "e": - return this.fmtFloatE(arg as number); - case "E": - return this.fmtFloatE(arg as number, true); - case "f": - case "F": - return this.fmtFloatF(arg as number); - case "g": - return this.fmtFloatG(arg as number); - case "G": - return this.fmtFloatG(arg as number, true); - case "s": - return this.fmtString(arg as string); - case "T": - return this.fmtString(typeof arg); - case "v": - return this.fmtV(arg); - case "j": - return this.fmtJ(arg); - default: - return `%!(BAD VERB '${this.verb}')`; - } - } - - /** - * Pad a string - * @param s text to pad - */ - pad(s: string): string { - const padding = this.flags.zero ? "0" : " "; - - if (this.flags.dash) { - return s.padEnd(this.flags.width, padding); - } - - return s.padStart(this.flags.width, padding); - } - - /** - * Pad a number - * @param nStr - * @param neg - */ - padNum(nStr: string, neg: boolean): string { - let sign: string; - if (neg) { - sign = "-"; - } else if (this.flags.plus || this.flags.space) { - sign = this.flags.plus ? "+" : " "; - } else { - sign = ""; - } - const zero = this.flags.zero; - if (!zero) { - // sign comes in front of padding when padding w/ zero, - // in from of value if padding with spaces. - nStr = sign + nStr; - } - - const pad = zero ? "0" : " "; - const len = zero ? this.flags.width - sign.length : this.flags.width; - - if (this.flags.dash) { - nStr = nStr.padEnd(len, pad); - } else { - nStr = nStr.padStart(len, pad); - } - - if (zero) { - // see above - nStr = sign + nStr; - } - return nStr; - } - - /** - * Format a number - * @param n - * @param radix - * @param upcase - */ - fmtNumber(n: number, radix: number, upcase = false): string { - let num = Math.abs(n).toString(radix); - const prec = this.flags.precision; - if (prec !== -1) { - this.flags.zero = false; - num = n === 0 && prec === 0 ? "" : num; - while (num.length < prec) { - num = "0" + num; - } - } - let prefix = ""; - if (this.flags.sharp) { - switch (radix) { - case 2: - prefix += "0b"; - break; - case 8: - // don't annotate octal 0 with 0... - prefix += num.startsWith("0") ? "" : "0"; - break; - case 16: - prefix += "0x"; - break; - default: - throw new Error("cannot handle base: " + radix); - } - } - // don't add prefix in front of value truncated by precision=0, val=0 - num = num.length === 0 ? num : prefix + num; - if (upcase) { - num = num.toUpperCase(); - } - return this.padNum(num, n < 0); - } - - /** - * Format number with code points - * @param n - */ - fmtNumberCodePoint(n: number): string { - let s = ""; - try { - s = String.fromCodePoint(n); - } catch { - s = UNICODE_REPLACEMENT_CHARACTER; - } - return this.pad(s); - } - - /** - * Format special float - * @param n - */ - fmtFloatSpecial(n: number): string { - // formatting of NaN and Inf are pants-on-head - // stupid and more or less arbitrary. - - if (isNaN(n)) { - this.flags.zero = false; - return this.padNum("NaN", false); - } - if (n === Number.POSITIVE_INFINITY) { - this.flags.zero = false; - this.flags.plus = true; - return this.padNum("Inf", false); - } - if (n === Number.NEGATIVE_INFINITY) { - this.flags.zero = false; - return this.padNum("Inf", true); - } - return ""; - } - - /** - * Round fraction to precision - * @param fractional - * @param precision - */ - roundFractionToPrecision(fractional: string, precision: number): string { - if (fractional.length > precision) { - fractional = "1" + fractional; // prepend a 1 in case of leading 0 - let tmp = parseInt(fractional.substr(0, precision + 2)) / 10; - tmp = Math.round(tmp); - fractional = Math.floor(tmp).toString(); - fractional = fractional.substr(1); // remove extra 1 - } else { - while (fractional.length < precision) { - fractional += "0"; - } - } - return fractional; - } - - /** - * Format float E - * @param n - * @param upcase - */ - fmtFloatE(n: number, upcase = false): string { - const special = this.fmtFloatSpecial(n); - if (special !== "") { - return special; - } - - const m = n.toExponential().match(FLOAT_REGEXP); - if (!m) { - throw Error("can't happen, bug"); - } - - let fractional = m[F.fractional]; - const precision = this.flags.precision !== -1 - ? this.flags.precision - : DEFAULT_PRECISION; - fractional = this.roundFractionToPrecision(fractional, precision); - - let e = m[F.exponent]; - // scientific notation output with exponent padded to minlen 2 - e = e.length == 1 ? "0" + e : e; - - const val = `${m[F.mantissa]}.${fractional}${upcase ? "E" : "e"}${ - m[F.esign] - }${e}`; - return this.padNum(val, n < 0); - } - - /** - * Format float F - * @param n - */ - fmtFloatF(n: number): string { - const special = this.fmtFloatSpecial(n); - if (special !== "") { - return special; - } - - // stupid helper that turns a number into a (potentially) - // VERY long string. - function expandNumber(n: number): string { - if (Number.isSafeInteger(n)) { - return n.toString() + "."; - } - - const t = n.toExponential().split("e"); - let m = t[0].replace(".", ""); - const e = parseInt(t[1]); - if (e < 0) { - let nStr = "0."; - for (let i = 0; i !== Math.abs(e) - 1; ++i) { - nStr += "0"; - } - return (nStr += m); - } else { - const splIdx = e + 1; - while (m.length < splIdx) { - m += "0"; - } - return m.substr(0, splIdx) + "." + m.substr(splIdx); - } - } - // avoiding sign makes padding easier - const val = expandNumber(Math.abs(n)) as string; - const arr = val.split("."); - const dig = arr[0]; - let fractional = arr[1]; - - const precision = this.flags.precision !== -1 - ? this.flags.precision - : DEFAULT_PRECISION; - fractional = this.roundFractionToPrecision(fractional, precision); - - return this.padNum(`${dig}.${fractional}`, n < 0); - } - - /** - * Format float G - * @param n - * @param upcase - */ - fmtFloatG(n: number, upcase = false): string { - const special = this.fmtFloatSpecial(n); - if (special !== "") { - return special; - } - - // The double argument representing a floating-point number shall be - // converted in the style f or e (or in the style F or E in - // the case of a G conversion specifier), depending on the - // value converted and the precision. Let P equal the - // precision if non-zero, 6 if the precision is omitted, or 1 - // if the precision is zero. Then, if a conversion with style E would - // have an exponent of X: - - // - If P > X>=-4, the conversion shall be with style f (or F ) - // and precision P -( X+1). - - // - Otherwise, the conversion shall be with style e (or E ) - // and precision P -1. - - // Finally, unless the '#' flag is used, any trailing zeros shall be - // removed from the fractional portion of the result and the - // decimal-point character shall be removed if there is no - // fractional portion remaining. - - // A double argument representing an infinity or NaN shall be - // converted in the style of an f or F conversion specifier. - // https://pubs.opengroup.org/onlinepubs/9699919799/functions/fprintf.html - - let P = this.flags.precision !== -1 - ? this.flags.precision - : DEFAULT_PRECISION; - P = P === 0 ? 1 : P; - - const m = n.toExponential().match(FLOAT_REGEXP); - if (!m) { - throw Error("can't happen"); - } - - const X = parseInt(m[F.exponent]) * (m[F.esign] === "-" ? -1 : 1); - let nStr = ""; - if (P > X && X >= -4) { - this.flags.precision = P - (X + 1); - nStr = this.fmtFloatF(n); - if (!this.flags.sharp) { - nStr = nStr.replace(/\.?0*$/, ""); - } - } else { - this.flags.precision = P - 1; - nStr = this.fmtFloatE(n); - if (!this.flags.sharp) { - nStr = nStr.replace(/\.?0*e/, upcase ? "E" : "e"); - } - } - return nStr; - } - - /** - * Format string - * @param s - */ - fmtString(s: string): string { - if (this.flags.precision !== -1) { - s = s.substr(0, this.flags.precision); - } - return this.pad(s); - } - - /** - * Format hex - * @param val - * @param upper - */ - fmtHex(val: string | number, upper = false): string { - // allow others types ? - switch (typeof val) { - case "number": - return this.fmtNumber(val as number, 16, upper); - case "string": { - const sharp = this.flags.sharp && val.length !== 0; - let hex = sharp ? "0x" : ""; - const prec = this.flags.precision; - const end = prec !== -1 ? min(prec, val.length) : val.length; - for (let i = 0; i !== end; ++i) { - if (i !== 0 && this.flags.space) { - hex += sharp ? " 0x" : " "; - } - // TODO(bartlomieju): for now only taking into account the - // lower half of the codePoint, ie. as if a string - // is a list of 8bit values instead of UCS2 runes - const c = (val.charCodeAt(i) & 0xff).toString(16); - hex += c.length === 1 ? `0${c}` : c; - } - if (upper) { - hex = hex.toUpperCase(); - } - return this.pad(hex); - } - default: - throw new Error( - "currently only number and string are implemented for hex", - ); - } - } - - /** - * Format value - * @param val - */ - fmtV(val: Record): string { - if (this.flags.sharp) { - const options = this.flags.precision !== -1 - ? { depth: this.flags.precision } - : {}; - return this.pad(Deno.inspect(val, options)); - } else { - const p = this.flags.precision; - return p === -1 ? val.toString() : val.toString().substr(0, p); - } - } - - /** - * Format JSON - * @param val - */ - fmtJ(val: unknown): string { - return JSON.stringify(val); - } -} - -/** - * Converts and format a variable number of `args` as is specified by `format`. - * `sprintf` returns the formatted string. - * - * @param format - * @param args - */ -export function sprintf(format: string, ...args: unknown[]): string { - const printf = new Printf(format, ...args); - return printf.doPrintf(); -} - -/** - * Converts and format a variable number of `args` as is specified by `format`. - * `printf` writes the formatted string to standard output. - * @param format - * @param args - */ -export function printf(format: string, ...args: unknown[]): void { - const s = sprintf(format, ...args); - Deno.stdout.writeSync(new TextEncoder().encode(s)); -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/fs/_util.ts b/src/resources/vendor/deno-land/std@0-93-0/fs/_util.ts deleted file mode 100644 index a9445a39475..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/fs/_util.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -import * as path from "../path/mod.ts"; - -/** - * Test whether or not `dest` is a sub-directory of `src` - * @param src src file path - * @param dest dest file path - * @param sep path separator - */ -export function isSubdir( - src: string, - dest: string, - sep: string = path.sep, -): boolean { - if (src === dest) { - return false; - } - const srcArray = src.split(sep); - const destArray = dest.split(sep); - return srcArray.every((current, i) => destArray[i] === current); -} - -export type PathType = "file" | "dir" | "symlink"; - -/** - * Get a human readable file type string. - * - * @param fileInfo A FileInfo describes a file and is returned by `stat`, - * `lstat` - */ -export function getFileInfoType(fileInfo: Deno.FileInfo): PathType | undefined { - return fileInfo.isFile - ? "file" - : fileInfo.isDirectory - ? "dir" - : fileInfo.isSymlink - ? "symlink" - : undefined; -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/fs/copy.ts b/src/resources/vendor/deno-land/std@0-93-0/fs/copy.ts deleted file mode 100644 index 11bbee0b6ab..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/fs/copy.ts +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -import * as path from "../path/mod.ts"; -import { ensureDir, ensureDirSync } from "./ensure_dir.ts"; -import { getFileInfoType, isSubdir } from "./_util.ts"; -import { assert } from "../_util/assert.ts"; -import { isWindows } from "../_util/os.ts"; - -export interface CopyOptions { - /** - * overwrite existing file or directory. Default is `false` - */ - overwrite?: boolean; - /** - * When `true`, will set last modification and access times to the ones of the - * original source files. - * When `false`, timestamp behavior is OS-dependent. - * Default is `false`. - */ - preserveTimestamps?: boolean; -} - -interface InternalCopyOptions extends CopyOptions { - /** - * default is `false` - */ - isFolder?: boolean; -} - -async function ensureValidCopy( - src: string, - dest: string, - options: InternalCopyOptions, -): Promise { - let destStat: Deno.FileInfo; - - try { - destStat = await Deno.lstat(dest); - } catch (err) { - if (err instanceof Deno.errors.NotFound) { - return; - } - throw err; - } - - if (options.isFolder && !destStat.isDirectory) { - throw new Error( - `Cannot overwrite non-directory '${dest}' with directory '${src}'.`, - ); - } - if (!options.overwrite) { - throw new Error(`'${dest}' already exists.`); - } - - return destStat; -} - -function ensureValidCopySync( - src: string, - dest: string, - options: InternalCopyOptions, -): Deno.FileInfo | undefined { - let destStat: Deno.FileInfo; - try { - destStat = Deno.lstatSync(dest); - } catch (err) { - if (err instanceof Deno.errors.NotFound) { - return; - } - throw err; - } - - if (options.isFolder && !destStat.isDirectory) { - throw new Error( - `Cannot overwrite non-directory '${dest}' with directory '${src}'.`, - ); - } - if (!options.overwrite) { - throw new Error(`'${dest}' already exists.`); - } - - return destStat; -} - -/* copy file to dest */ -async function copyFile( - src: string, - dest: string, - options: InternalCopyOptions, -) { - await ensureValidCopy(src, dest, options); - await Deno.copyFile(src, dest); - if (options.preserveTimestamps) { - const statInfo = await Deno.stat(src); - assert(statInfo.atime instanceof Date, `statInfo.atime is unavailable`); - assert(statInfo.mtime instanceof Date, `statInfo.mtime is unavailable`); - await Deno.utime(dest, statInfo.atime, statInfo.mtime); - } -} -/* copy file to dest synchronously */ -function copyFileSync( - src: string, - dest: string, - options: InternalCopyOptions, -): void { - ensureValidCopySync(src, dest, options); - Deno.copyFileSync(src, dest); - if (options.preserveTimestamps) { - const statInfo = Deno.statSync(src); - assert(statInfo.atime instanceof Date, `statInfo.atime is unavailable`); - assert(statInfo.mtime instanceof Date, `statInfo.mtime is unavailable`); - Deno.utimeSync(dest, statInfo.atime, statInfo.mtime); - } -} - -/* copy symlink to dest */ -async function copySymLink( - src: string, - dest: string, - options: InternalCopyOptions, -) { - await ensureValidCopy(src, dest, options); - const originSrcFilePath = await Deno.readLink(src); - const type = getFileInfoType(await Deno.lstat(src)); - if (isWindows) { - await Deno.symlink(originSrcFilePath, dest, { - type: type === "dir" ? "dir" : "file", - }); - } else { - await Deno.symlink(originSrcFilePath, dest); - } - if (options.preserveTimestamps) { - const statInfo = await Deno.lstat(src); - assert(statInfo.atime instanceof Date, `statInfo.atime is unavailable`); - assert(statInfo.mtime instanceof Date, `statInfo.mtime is unavailable`); - await Deno.utime(dest, statInfo.atime, statInfo.mtime); - } -} - -/* copy symlink to dest synchronously */ -function copySymlinkSync( - src: string, - dest: string, - options: InternalCopyOptions, -): void { - ensureValidCopySync(src, dest, options); - const originSrcFilePath = Deno.readLinkSync(src); - const type = getFileInfoType(Deno.lstatSync(src)); - if (isWindows) { - Deno.symlinkSync(originSrcFilePath, dest, { - type: type === "dir" ? "dir" : "file", - }); - } else { - Deno.symlinkSync(originSrcFilePath, dest); - } - - if (options.preserveTimestamps) { - const statInfo = Deno.lstatSync(src); - assert(statInfo.atime instanceof Date, `statInfo.atime is unavailable`); - assert(statInfo.mtime instanceof Date, `statInfo.mtime is unavailable`); - Deno.utimeSync(dest, statInfo.atime, statInfo.mtime); - } -} - -/* copy folder from src to dest. */ -async function copyDir( - src: string, - dest: string, - options: CopyOptions, -) { - const destStat = await ensureValidCopy(src, dest, { - ...options, - isFolder: true, - }); - - if (!destStat) { - await ensureDir(dest); - } - - if (options.preserveTimestamps) { - const srcStatInfo = await Deno.stat(src); - assert(srcStatInfo.atime instanceof Date, `statInfo.atime is unavailable`); - assert(srcStatInfo.mtime instanceof Date, `statInfo.mtime is unavailable`); - await Deno.utime(dest, srcStatInfo.atime, srcStatInfo.mtime); - } - - for await (const entry of Deno.readDir(src)) { - const srcPath = path.join(src, entry.name); - const destPath = path.join(dest, path.basename(srcPath as string)); - if (entry.isSymlink) { - await copySymLink(srcPath, destPath, options); - } else if (entry.isDirectory) { - await copyDir(srcPath, destPath, options); - } else if (entry.isFile) { - await copyFile(srcPath, destPath, options); - } - } -} - -/* copy folder from src to dest synchronously */ -function copyDirSync(src: string, dest: string, options: CopyOptions): void { - const destStat = ensureValidCopySync(src, dest, { - ...options, - isFolder: true, - }); - - if (!destStat) { - ensureDirSync(dest); - } - - if (options.preserveTimestamps) { - const srcStatInfo = Deno.statSync(src); - assert(srcStatInfo.atime instanceof Date, `statInfo.atime is unavailable`); - assert(srcStatInfo.mtime instanceof Date, `statInfo.mtime is unavailable`); - Deno.utimeSync(dest, srcStatInfo.atime, srcStatInfo.mtime); - } - - for (const entry of Deno.readDirSync(src)) { - assert(entry.name != null, "file.name must be set"); - const srcPath = path.join(src, entry.name); - const destPath = path.join(dest, path.basename(srcPath as string)); - if (entry.isSymlink) { - copySymlinkSync(srcPath, destPath, options); - } else if (entry.isDirectory) { - copyDirSync(srcPath, destPath, options); - } else if (entry.isFile) { - copyFileSync(srcPath, destPath, options); - } - } -} - -/** - * Copy a file or directory. The directory can have contents. Like `cp -r`. - * Requires the `--allow-read` and `--allow-write` flag. - * @param src the file/directory path. - * Note that if `src` is a directory it will copy everything inside - * of this directory, not the entire directory itself - * @param dest the destination path. Note that if `src` is a file, `dest` cannot - * be a directory - * @param options - */ -export async function copy( - src: string, - dest: string, - options: CopyOptions = {}, -) { - src = path.resolve(src); - dest = path.resolve(dest); - - if (src === dest) { - throw new Error("Source and destination cannot be the same."); - } - - const srcStat = await Deno.lstat(src); - - if (srcStat.isDirectory && isSubdir(src, dest)) { - throw new Error( - `Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`, - ); - } - - if (srcStat.isSymlink) { - await copySymLink(src, dest, options); - } else if (srcStat.isDirectory) { - await copyDir(src, dest, options); - } else if (srcStat.isFile) { - await copyFile(src, dest, options); - } -} - -/** - * Copy a file or directory. The directory can have contents. Like `cp -r`. - * Requires the `--allow-read` and `--allow-write` flag. - * @param src the file/directory path. - * Note that if `src` is a directory it will copy everything inside - * of this directory, not the entire directory itself - * @param dest the destination path. Note that if `src` is a file, `dest` cannot - * be a directory - * @param options - */ -export function copySync( - src: string, - dest: string, - options: CopyOptions = {}, -): void { - src = path.resolve(src); - dest = path.resolve(dest); - - if (src === dest) { - throw new Error("Source and destination cannot be the same."); - } - - const srcStat = Deno.lstatSync(src); - - if (srcStat.isDirectory && isSubdir(src, dest)) { - throw new Error( - `Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`, - ); - } - - if (srcStat.isSymlink) { - copySymlinkSync(src, dest, options); - } else if (srcStat.isDirectory) { - copyDirSync(src, dest, options); - } else if (srcStat.isFile) { - copyFileSync(src, dest, options); - } -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/fs/ensure_dir.ts b/src/resources/vendor/deno-land/std@0-93-0/fs/ensure_dir.ts deleted file mode 100644 index 8c99747afeb..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/fs/ensure_dir.ts +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -import { getFileInfoType } from "./_util.ts"; - -/** - * Ensures that the directory exists. - * If the directory structure does not exist, it is created. Like mkdir -p. - * Requires the `--allow-read` and `--allow-write` flag. - */ -export async function ensureDir(dir: string) { - try { - const fileInfo = await Deno.lstat(dir); - if (!fileInfo.isDirectory) { - throw new Error( - `Ensure path exists, expected 'dir', got '${ - getFileInfoType(fileInfo) - }'`, - ); - } - } catch (err) { - if (err instanceof Deno.errors.NotFound) { - // if dir not exists. then create it. - await Deno.mkdir(dir, { recursive: true }); - return; - } - throw err; - } -} - -/** - * Ensures that the directory exists. - * If the directory structure does not exist, it is created. Like mkdir -p. - * Requires the `--allow-read` and `--allow-write` flag. - */ -export function ensureDirSync(dir: string): void { - try { - const fileInfo = Deno.lstatSync(dir); - if (!fileInfo.isDirectory) { - throw new Error( - `Ensure path exists, expected 'dir', got '${ - getFileInfoType(fileInfo) - }'`, - ); - } - } catch (err) { - if (err instanceof Deno.errors.NotFound) { - // if dir not exists. then create it. - Deno.mkdirSync(dir, { recursive: true }); - return; - } - throw err; - } -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/fs/exists.ts b/src/resources/vendor/deno-land/std@0-93-0/fs/exists.ts deleted file mode 100644 index e98bbcc70fd..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/fs/exists.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -/** - * Test whether or not the given path exists by checking with the file system - */ -export async function exists(filePath: string): Promise { - try { - await Deno.lstat(filePath); - return true; - } catch (err) { - if (err instanceof Deno.errors.NotFound) { - return false; - } - - throw err; - } -} - -/** - * Test whether or not the given path exists by checking with the file system - */ -export function existsSync(filePath: string): boolean { - try { - Deno.lstatSync(filePath); - return true; - } catch (err) { - if (err instanceof Deno.errors.NotFound) { - return false; - } - throw err; - } -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/fs/walk.ts b/src/resources/vendor/deno-land/std@0-93-0/fs/walk.ts deleted file mode 100644 index 4ce56443541..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/fs/walk.ts +++ /dev/null @@ -1,188 +0,0 @@ -// Documentation and interface for walk were adapted from Go -// https://golang.org/pkg/path/filepath/#Walk -// Copyright 2009 The Go Authors. All rights reserved. BSD license. -import { assert } from "../_util/assert.ts"; -import { basename, join, normalize } from "../path/mod.ts"; - -/** Create WalkEntry for the `path` synchronously */ -export function _createWalkEntrySync(path: string): WalkEntry { - path = normalize(path); - const name = basename(path); - const info = Deno.statSync(path); - return { - path, - name, - isFile: info.isFile, - isDirectory: info.isDirectory, - isSymlink: info.isSymlink, - }; -} - -/** Create WalkEntry for the `path` asynchronously */ -export async function _createWalkEntry(path: string): Promise { - path = normalize(path); - const name = basename(path); - const info = await Deno.stat(path); - return { - path, - name, - isFile: info.isFile, - isDirectory: info.isDirectory, - isSymlink: info.isSymlink, - }; -} - -export interface WalkOptions { - maxDepth?: number; - includeFiles?: boolean; - includeDirs?: boolean; - followSymlinks?: boolean; - exts?: string[]; - match?: RegExp[]; - skip?: RegExp[]; -} - -function include( - path: string, - exts?: string[], - match?: RegExp[], - skip?: RegExp[], -): boolean { - if (exts && !exts.some((ext): boolean => path.endsWith(ext))) { - return false; - } - if (match && !match.some((pattern): boolean => !!path.match(pattern))) { - return false; - } - if (skip && skip.some((pattern): boolean => !!path.match(pattern))) { - return false; - } - return true; -} - -export interface WalkEntry extends Deno.DirEntry { - path: string; -} - -/** Walks the file tree rooted at root, yielding each file or directory in the - * tree filtered according to the given options. The files are walked in lexical - * order, which makes the output deterministic but means that for very large - * directories walk() can be inefficient. - * - * Options: - * - maxDepth?: number = Infinity; - * - includeFiles?: boolean = true; - * - includeDirs?: boolean = true; - * - followSymlinks?: boolean = false; - * - exts?: string[]; - * - match?: RegExp[]; - * - skip?: RegExp[]; - * - * - * for await (const entry of walk(".")) { - * console.log(entry.path); - * assert(entry.isFile); - * } - */ -export async function* walk( - root: string, - { - maxDepth = Infinity, - includeFiles = true, - includeDirs = true, - followSymlinks = false, - exts = undefined, - match = undefined, - skip = undefined, - }: WalkOptions = {}, -): AsyncIterableIterator { - if (maxDepth < 0) { - return; - } - if (includeDirs && include(root, exts, match, skip)) { - yield await _createWalkEntry(root); - } - if (maxDepth < 1 || !include(root, undefined, undefined, skip)) { - return; - } - for await (const entry of Deno.readDir(root)) { - assert(entry.name != null); - let path = join(root, entry.name); - - if (entry.isSymlink) { - if (followSymlinks) { - path = await Deno.realPath(path); - } else { - continue; - } - } - - if (entry.isFile) { - if (includeFiles && include(path, exts, match, skip)) { - yield { path, ...entry }; - } - } else { - yield* walk(path, { - maxDepth: maxDepth - 1, - includeFiles, - includeDirs, - followSymlinks, - exts, - match, - skip, - }); - } - } -} - -/** Same as walk() but uses synchronous ops */ -export function* walkSync( - root: string, - { - maxDepth = Infinity, - includeFiles = true, - includeDirs = true, - followSymlinks = false, - exts = undefined, - match = undefined, - skip = undefined, - }: WalkOptions = {}, -): IterableIterator { - if (maxDepth < 0) { - return; - } - if (includeDirs && include(root, exts, match, skip)) { - yield _createWalkEntrySync(root); - } - if (maxDepth < 1 || !include(root, undefined, undefined, skip)) { - return; - } - for (const entry of Deno.readDirSync(root)) { - assert(entry.name != null); - let path = join(root, entry.name); - - if (entry.isSymlink) { - if (followSymlinks) { - path = Deno.realPathSync(path); - } else { - continue; - } - } - - if (entry.isFile) { - if (includeFiles && include(path, exts, match, skip)) { - yield { path, ...entry }; - } - } else { - yield* walkSync(path, { - maxDepth: maxDepth - 1, - includeFiles, - includeDirs, - followSymlinks, - exts, - match, - skip, - }); - } - } -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/io/buffer.ts b/src/resources/vendor/deno-land/std@0-93-0/io/buffer.ts deleted file mode 100644 index 879eadf7e8d..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/io/buffer.ts +++ /dev/null @@ -1,260 +0,0 @@ -import { assert } from "../_util/assert.ts"; - -// MIN_READ is the minimum ArrayBuffer size passed to a read call by -// buffer.ReadFrom. As long as the Buffer has at least MIN_READ bytes beyond -// what is required to hold the contents of r, readFrom() will not grow the -// underlying buffer. -const MIN_READ = 32 * 1024; -const MAX_SIZE = 2 ** 32 - 2; - -// `off` is the offset into `dst` where it will at which to begin writing values -// from `src`. -// Returns the number of bytes copied. -function copyBytes(src: Uint8Array, dst: Uint8Array, off = 0) { - const r = dst.byteLength - off; - if (src.byteLength > r) { - src = src.subarray(0, r); - } - dst.set(src, off); - return src.byteLength; -} - -/** A variable-sized buffer of bytes with `read()` and `write()` methods. - * - * Buffer is almost always used with some I/O like files and sockets. It allows - * one to buffer up a download from a socket. Buffer grows and shrinks as - * necessary. - * - * Buffer is NOT the same thing as Node's Buffer. Node's Buffer was created in - * 2009 before JavaScript had the concept of ArrayBuffers. It's simply a - * non-standard ArrayBuffer. - * - * ArrayBuffer is a fixed memory allocation. Buffer is implemented on top of - * ArrayBuffer. - * - * Based on [Go Buffer](https://golang.org/pkg/bytes/#Buffer). */ - -export class Buffer { - #buf: Uint8Array; // contents are the bytes buf[off : len(buf)] - #off = 0; // read at buf[off], write at buf[buf.byteLength] - - constructor(ab?: ArrayBuffer) { - if (ab === undefined) { - this.#buf = new Uint8Array(0); - return; - } - this.#buf = new Uint8Array(ab); - } - - /** Returns a slice holding the unread portion of the buffer. - * - * The slice is valid for use only until the next buffer modification (that - * is, only until the next call to a method like `read()`, `write()`, - * `reset()`, or `truncate()`). If `options.copy` is false the slice aliases the buffer content at - * least until the next buffer modification, so immediate changes to the - * slice will affect the result of future reads. - * @param options Defaults to `{ copy: true }` - */ - bytes(options = { copy: true }): Uint8Array { - if (options.copy === false) return this.#buf.subarray(this.#off); - return this.#buf.slice(this.#off); - } - - /** Returns whether the unread portion of the buffer is empty. */ - empty(): boolean { - return this.#buf.byteLength <= this.#off; - } - - /** A read only number of bytes of the unread portion of the buffer. */ - get length(): number { - return this.#buf.byteLength - this.#off; - } - - /** The read only capacity of the buffer's underlying byte slice, that is, - * the total space allocated for the buffer's data. */ - get capacity(): number { - return this.#buf.buffer.byteLength; - } - - /** Discards all but the first `n` unread bytes from the buffer but - * continues to use the same allocated storage. It throws if `n` is - * negative or greater than the length of the buffer. */ - truncate(n: number): void { - if (n === 0) { - this.reset(); - return; - } - if (n < 0 || n > this.length) { - throw Error("bytes.Buffer: truncation out of range"); - } - this.#reslice(this.#off + n); - } - - reset(): void { - this.#reslice(0); - this.#off = 0; - } - - #tryGrowByReslice = (n: number) => { - const l = this.#buf.byteLength; - if (n <= this.capacity - l) { - this.#reslice(l + n); - return l; - } - return -1; - }; - - #reslice = (len: number) => { - assert(len <= this.#buf.buffer.byteLength); - this.#buf = new Uint8Array(this.#buf.buffer, 0, len); - }; - - /** Reads the next `p.length` bytes from the buffer or until the buffer is - * drained. Returns the number of bytes read. If the buffer has no data to - * return, the return is EOF (`null`). */ - readSync(p: Uint8Array): number | null { - if (this.empty()) { - // Buffer is empty, reset to recover space. - this.reset(); - if (p.byteLength === 0) { - // this edge case is tested in 'bufferReadEmptyAtEOF' test - return 0; - } - return null; - } - const nread = copyBytes(this.#buf.subarray(this.#off), p); - this.#off += nread; - return nread; - } - - /** Reads the next `p.length` bytes from the buffer or until the buffer is - * drained. Resolves to the number of bytes read. If the buffer has no - * data to return, resolves to EOF (`null`). - * - * NOTE: This methods reads bytes synchronously; it's provided for - * compatibility with `Reader` interfaces. - */ - read(p: Uint8Array): Promise { - const rr = this.readSync(p); - return Promise.resolve(rr); - } - - writeSync(p: Uint8Array): number { - const m = this.#grow(p.byteLength); - return copyBytes(p, this.#buf, m); - } - - /** NOTE: This methods writes bytes synchronously; it's provided for - * compatibility with `Writer` interface. */ - write(p: Uint8Array): Promise { - const n = this.writeSync(p); - return Promise.resolve(n); - } - - #grow = (n: number) => { - const m = this.length; - // If buffer is empty, reset to recover space. - if (m === 0 && this.#off !== 0) { - this.reset(); - } - // Fast: Try to grow by means of a reslice. - const i = this.#tryGrowByReslice(n); - if (i >= 0) { - return i; - } - const c = this.capacity; - if (n <= Math.floor(c / 2) - m) { - // We can slide things down instead of allocating a new - // ArrayBuffer. We only need m+n <= c to slide, but - // we instead let capacity get twice as large so we - // don't spend all our time copying. - copyBytes(this.#buf.subarray(this.#off), this.#buf); - } else if (c + n > MAX_SIZE) { - throw new Error("The buffer cannot be grown beyond the maximum size."); - } else { - // Not enough space anywhere, we need to allocate. - const buf = new Uint8Array(Math.min(2 * c + n, MAX_SIZE)); - copyBytes(this.#buf.subarray(this.#off), buf); - this.#buf = buf; - } - // Restore this.#off and len(this.#buf). - this.#off = 0; - this.#reslice(Math.min(m + n, MAX_SIZE)); - return m; - }; - - /** Grows the buffer's capacity, if necessary, to guarantee space for - * another `n` bytes. After `.grow(n)`, at least `n` bytes can be written to - * the buffer without another allocation. If `n` is negative, `.grow()` will - * throw. If the buffer can't grow it will throw an error. - * - * Based on Go Lang's - * [Buffer.Grow](https://golang.org/pkg/bytes/#Buffer.Grow). */ - grow(n: number): void { - if (n < 0) { - throw Error("Buffer.grow: negative count"); - } - const m = this.#grow(n); - this.#reslice(m); - } - - /** Reads data from `r` until EOF (`null`) and appends it to the buffer, - * growing the buffer as needed. It resolves to the number of bytes read. - * If the buffer becomes too large, `.readFrom()` will reject with an error. - * - * Based on Go Lang's - * [Buffer.ReadFrom](https://golang.org/pkg/bytes/#Buffer.ReadFrom). */ - async readFrom(r: Deno.Reader): Promise { - let n = 0; - const tmp = new Uint8Array(MIN_READ); - while (true) { - const shouldGrow = this.capacity - this.length < MIN_READ; - // read into tmp buffer if there's not enough room - // otherwise read directly into the internal buffer - const buf = shouldGrow - ? tmp - : new Uint8Array(this.#buf.buffer, this.length); - - const nread = await r.read(buf); - if (nread === null) { - return n; - } - - // write will grow if needed - if (shouldGrow) this.writeSync(buf.subarray(0, nread)); - else this.#reslice(this.length + nread); - - n += nread; - } - } - - /** Reads data from `r` until EOF (`null`) and appends it to the buffer, - * growing the buffer as needed. It returns the number of bytes read. If the - * buffer becomes too large, `.readFromSync()` will throw an error. - * - * Based on Go Lang's - * [Buffer.ReadFrom](https://golang.org/pkg/bytes/#Buffer.ReadFrom). */ - readFromSync(r: Deno.ReaderSync): number { - let n = 0; - const tmp = new Uint8Array(MIN_READ); - while (true) { - const shouldGrow = this.capacity - this.length < MIN_READ; - // read into tmp buffer if there's not enough room - // otherwise read directly into the internal buffer - const buf = shouldGrow - ? tmp - : new Uint8Array(this.#buf.buffer, this.length); - - const nread = r.readSync(buf); - if (nread === null) { - return n; - } - - // write will grow if needed - if (shouldGrow) this.writeSync(buf.subarray(0, nread)); - else this.#reslice(this.length + nread); - - n += nread; - } - } -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/io/bufio.ts b/src/resources/vendor/deno-land/std@0-93-0/io/bufio.ts deleted file mode 100644 index 55f71cef43b..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/io/bufio.ts +++ /dev/null @@ -1,720 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// Based on https://github.com/golang/go/blob/891682/src/bufio/bufio.go -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -type Reader = Deno.Reader; -type Writer = Deno.Writer; -type WriterSync = Deno.WriterSync; -import { copy } from "../bytes/mod.ts"; -import { assert } from "../_util/assert.ts"; -import { Buffer } from "./buffer.ts"; -import { writeAll, writeAllSync } from "./util.ts"; - -const DEFAULT_BUF_SIZE = 4096; -const MIN_BUF_SIZE = 16; -const MAX_CONSECUTIVE_EMPTY_READS = 100; -const CR = "\r".charCodeAt(0); -const LF = "\n".charCodeAt(0); - -export class BufferFullError extends Error { - name = "BufferFullError"; - constructor(public partial: Uint8Array) { - super("Buffer full"); - } -} - -export class PartialReadError extends Error { - name = "PartialReadError"; - partial?: Uint8Array; - constructor() { - super("Encountered UnexpectedEof, data only partially read"); - } -} - -/** Result type returned by of BufReader.readLine(). */ -export interface ReadLineResult { - line: Uint8Array; - more: boolean; -} - -/** BufReader implements buffering for a Reader object. */ -export class BufReader implements Reader { - private buf!: Uint8Array; - private rd!: Reader; // Reader provided by caller. - private r = 0; // buf read position. - private w = 0; // buf write position. - private eof = false; - // private lastByte: number; - // private lastCharSize: number; - - /** return new BufReader unless r is BufReader */ - static create(r: Reader, size: number = DEFAULT_BUF_SIZE): BufReader { - return r instanceof BufReader ? r : new BufReader(r, size); - } - - constructor(rd: Reader, size: number = DEFAULT_BUF_SIZE) { - if (size < MIN_BUF_SIZE) { - size = MIN_BUF_SIZE; - } - this._reset(new Uint8Array(size), rd); - } - - /** Returns the size of the underlying buffer in bytes. */ - size(): number { - return this.buf.byteLength; - } - - buffered(): number { - return this.w - this.r; - } - - // Reads a new chunk into the buffer. - private async _fill() { - // Slide existing data to beginning. - if (this.r > 0) { - this.buf.copyWithin(0, this.r, this.w); - this.w -= this.r; - this.r = 0; - } - - if (this.w >= this.buf.byteLength) { - throw Error("bufio: tried to fill full buffer"); - } - - // Read new data: try a limited number of times. - for (let i = MAX_CONSECUTIVE_EMPTY_READS; i > 0; i--) { - const rr = await this.rd.read(this.buf.subarray(this.w)); - if (rr === null) { - this.eof = true; - return; - } - assert(rr >= 0, "negative read"); - this.w += rr; - if (rr > 0) { - return; - } - } - - throw new Error( - `No progress after ${MAX_CONSECUTIVE_EMPTY_READS} read() calls`, - ); - } - - /** Discards any buffered data, resets all state, and switches - * the buffered reader to read from r. - */ - reset(r: Reader): void { - this._reset(this.buf, r); - } - - private _reset(buf: Uint8Array, rd: Reader): void { - this.buf = buf; - this.rd = rd; - this.eof = false; - // this.lastByte = -1; - // this.lastCharSize = -1; - } - - /** reads data into p. - * It returns the number of bytes read into p. - * The bytes are taken from at most one Read on the underlying Reader, - * hence n may be less than len(p). - * To read exactly len(p) bytes, use io.ReadFull(b, p). - */ - async read(p: Uint8Array): Promise { - let rr: number | null = p.byteLength; - if (p.byteLength === 0) return rr; - - if (this.r === this.w) { - if (p.byteLength >= this.buf.byteLength) { - // Large read, empty buffer. - // Read directly into p to avoid copy. - const rr = await this.rd.read(p); - const nread = rr ?? 0; - assert(nread >= 0, "negative read"); - // if (rr.nread > 0) { - // this.lastByte = p[rr.nread - 1]; - // this.lastCharSize = -1; - // } - return rr; - } - - // One read. - // Do not use this.fill, which will loop. - this.r = 0; - this.w = 0; - rr = await this.rd.read(this.buf); - if (rr === 0 || rr === null) return rr; - assert(rr >= 0, "negative read"); - this.w += rr; - } - - // copy as much as we can - const copied = copy(this.buf.subarray(this.r, this.w), p, 0); - this.r += copied; - // this.lastByte = this.buf[this.r - 1]; - // this.lastCharSize = -1; - return copied; - } - - /** reads exactly `p.length` bytes into `p`. - * - * If successful, `p` is returned. - * - * If the end of the underlying stream has been reached, and there are no more - * bytes available in the buffer, `readFull()` returns `null` instead. - * - * An error is thrown if some bytes could be read, but not enough to fill `p` - * entirely before the underlying stream reported an error or EOF. Any error - * thrown will have a `partial` property that indicates the slice of the - * buffer that has been successfully filled with data. - * - * Ported from https://golang.org/pkg/io/#ReadFull - */ - async readFull(p: Uint8Array): Promise { - let bytesRead = 0; - while (bytesRead < p.length) { - try { - const rr = await this.read(p.subarray(bytesRead)); - if (rr === null) { - if (bytesRead === 0) { - return null; - } else { - throw new PartialReadError(); - } - } - bytesRead += rr; - } catch (err) { - err.partial = p.subarray(0, bytesRead); - throw err; - } - } - return p; - } - - /** Returns the next byte [0, 255] or `null`. */ - async readByte(): Promise { - while (this.r === this.w) { - if (this.eof) return null; - await this._fill(); // buffer is empty. - } - const c = this.buf[this.r]; - this.r++; - // this.lastByte = c; - return c; - } - - /** readString() reads until the first occurrence of delim in the input, - * returning a string containing the data up to and including the delimiter. - * If ReadString encounters an error before finding a delimiter, - * it returns the data read before the error and the error itself - * (often `null`). - * ReadString returns err != nil if and only if the returned data does not end - * in delim. - * For simple uses, a Scanner may be more convenient. - */ - async readString(delim: string): Promise { - if (delim.length !== 1) { - throw new Error("Delimiter should be a single character"); - } - const buffer = await this.readSlice(delim.charCodeAt(0)); - if (buffer === null) return null; - return new TextDecoder().decode(buffer); - } - - /** `readLine()` is a low-level line-reading primitive. Most callers should - * use `readString('\n')` instead or use a Scanner. - * - * `readLine()` tries to return a single line, not including the end-of-line - * bytes. If the line was too long for the buffer then `more` is set and the - * beginning of the line is returned. The rest of the line will be returned - * from future calls. `more` will be false when returning the last fragment - * of the line. The returned buffer is only valid until the next call to - * `readLine()`. - * - * The text returned from ReadLine does not include the line end ("\r\n" or - * "\n"). - * - * When the end of the underlying stream is reached, the final bytes in the - * stream are returned. No indication or error is given if the input ends - * without a final line end. When there are no more trailing bytes to read, - * `readLine()` returns `null`. - * - * Calling `unreadByte()` after `readLine()` will always unread the last byte - * read (possibly a character belonging to the line end) even if that byte is - * not part of the line returned by `readLine()`. - */ - async readLine(): Promise { - let line: Uint8Array | null; - - try { - line = await this.readSlice(LF); - } catch (err) { - let { partial } = err; - assert( - partial instanceof Uint8Array, - "bufio: caught error from `readSlice()` without `partial` property", - ); - - // Don't throw if `readSlice()` failed with `BufferFullError`, instead we - // just return whatever is available and set the `more` flag. - if (!(err instanceof BufferFullError)) { - throw err; - } - - // Handle the case where "\r\n" straddles the buffer. - if ( - !this.eof && - partial.byteLength > 0 && - partial[partial.byteLength - 1] === CR - ) { - // Put the '\r' back on buf and drop it from line. - // Let the next call to ReadLine check for "\r\n". - assert(this.r > 0, "bufio: tried to rewind past start of buffer"); - this.r--; - partial = partial.subarray(0, partial.byteLength - 1); - } - - return { line: partial, more: !this.eof }; - } - - if (line === null) { - return null; - } - - if (line.byteLength === 0) { - return { line, more: false }; - } - - if (line[line.byteLength - 1] == LF) { - let drop = 1; - if (line.byteLength > 1 && line[line.byteLength - 2] === CR) { - drop = 2; - } - line = line.subarray(0, line.byteLength - drop); - } - return { line, more: false }; - } - - /** `readSlice()` reads until the first occurrence of `delim` in the input, - * returning a slice pointing at the bytes in the buffer. The bytes stop - * being valid at the next read. - * - * If `readSlice()` encounters an error before finding a delimiter, or the - * buffer fills without finding a delimiter, it throws an error with a - * `partial` property that contains the entire buffer. - * - * If `readSlice()` encounters the end of the underlying stream and there are - * any bytes left in the buffer, the rest of the buffer is returned. In other - * words, EOF is always treated as a delimiter. Once the buffer is empty, - * it returns `null`. - * - * Because the data returned from `readSlice()` will be overwritten by the - * next I/O operation, most clients should use `readString()` instead. - */ - async readSlice(delim: number): Promise { - let s = 0; // search start index - let slice: Uint8Array | undefined; - - while (true) { - // Search buffer. - let i = this.buf.subarray(this.r + s, this.w).indexOf(delim); - if (i >= 0) { - i += s; - slice = this.buf.subarray(this.r, this.r + i + 1); - this.r += i + 1; - break; - } - - // EOF? - if (this.eof) { - if (this.r === this.w) { - return null; - } - slice = this.buf.subarray(this.r, this.w); - this.r = this.w; - break; - } - - // Buffer full? - if (this.buffered() >= this.buf.byteLength) { - this.r = this.w; - // #4521 The internal buffer should not be reused across reads because it causes corruption of data. - const oldbuf = this.buf; - const newbuf = this.buf.slice(0); - this.buf = newbuf; - throw new BufferFullError(oldbuf); - } - - s = this.w - this.r; // do not rescan area we scanned before - - // Buffer is not full. - try { - await this._fill(); - } catch (err) { - err.partial = slice; - throw err; - } - } - - // Handle last byte, if any. - // const i = slice.byteLength - 1; - // if (i >= 0) { - // this.lastByte = slice[i]; - // this.lastCharSize = -1 - // } - - return slice; - } - - /** `peek()` returns the next `n` bytes without advancing the reader. The - * bytes stop being valid at the next read call. - * - * When the end of the underlying stream is reached, but there are unread - * bytes left in the buffer, those bytes are returned. If there are no bytes - * left in the buffer, it returns `null`. - * - * If an error is encountered before `n` bytes are available, `peek()` throws - * an error with the `partial` property set to a slice of the buffer that - * contains the bytes that were available before the error occurred. - */ - async peek(n: number): Promise { - if (n < 0) { - throw Error("negative count"); - } - - let avail = this.w - this.r; - while (avail < n && avail < this.buf.byteLength && !this.eof) { - try { - await this._fill(); - } catch (err) { - err.partial = this.buf.subarray(this.r, this.w); - throw err; - } - avail = this.w - this.r; - } - - if (avail === 0 && this.eof) { - return null; - } else if (avail < n && this.eof) { - return this.buf.subarray(this.r, this.r + avail); - } else if (avail < n) { - throw new BufferFullError(this.buf.subarray(this.r, this.w)); - } - - return this.buf.subarray(this.r, this.r + n); - } -} - -abstract class AbstractBufBase { - buf!: Uint8Array; - usedBufferBytes = 0; - err: Error | null = null; - - /** Size returns the size of the underlying buffer in bytes. */ - size(): number { - return this.buf.byteLength; - } - - /** Returns how many bytes are unused in the buffer. */ - available(): number { - return this.buf.byteLength - this.usedBufferBytes; - } - - /** buffered returns the number of bytes that have been written into the - * current buffer. - */ - buffered(): number { - return this.usedBufferBytes; - } -} - -/** BufWriter implements buffering for an deno.Writer object. - * If an error occurs writing to a Writer, no more data will be - * accepted and all subsequent writes, and flush(), will return the error. - * After all data has been written, the client should call the - * flush() method to guarantee all data has been forwarded to - * the underlying deno.Writer. - */ -export class BufWriter extends AbstractBufBase implements Writer { - /** return new BufWriter unless writer is BufWriter */ - static create(writer: Writer, size: number = DEFAULT_BUF_SIZE): BufWriter { - return writer instanceof BufWriter ? writer : new BufWriter(writer, size); - } - - constructor(private writer: Writer, size: number = DEFAULT_BUF_SIZE) { - super(); - if (size <= 0) { - size = DEFAULT_BUF_SIZE; - } - this.buf = new Uint8Array(size); - } - - /** Discards any unflushed buffered data, clears any error, and - * resets buffer to write its output to w. - */ - reset(w: Writer): void { - this.err = null; - this.usedBufferBytes = 0; - this.writer = w; - } - - /** Flush writes any buffered data to the underlying io.Writer. */ - async flush() { - if (this.err !== null) throw this.err; - if (this.usedBufferBytes === 0) return; - - try { - await writeAll( - this.writer, - this.buf.subarray(0, this.usedBufferBytes), - ); - } catch (e) { - this.err = e; - throw e; - } - - this.buf = new Uint8Array(this.buf.length); - this.usedBufferBytes = 0; - } - - /** Writes the contents of `data` into the buffer. If the contents won't fully - * fit into the buffer, those bytes that can are copied into the buffer, the - * buffer is the flushed to the writer and the remaining bytes are copied into - * the now empty buffer. - * - * @return the number of bytes written to the buffer. - */ - async write(data: Uint8Array): Promise { - if (this.err !== null) throw this.err; - if (data.length === 0) return 0; - - let totalBytesWritten = 0; - let numBytesWritten = 0; - while (data.byteLength > this.available()) { - if (this.buffered() === 0) { - // Large write, empty buffer. - // Write directly from data to avoid copy. - try { - numBytesWritten = await this.writer.write(data); - } catch (e) { - this.err = e; - throw e; - } - } else { - numBytesWritten = copy(data, this.buf, this.usedBufferBytes); - this.usedBufferBytes += numBytesWritten; - await this.flush(); - } - totalBytesWritten += numBytesWritten; - data = data.subarray(numBytesWritten); - } - - numBytesWritten = copy(data, this.buf, this.usedBufferBytes); - this.usedBufferBytes += numBytesWritten; - totalBytesWritten += numBytesWritten; - return totalBytesWritten; - } -} - -/** BufWriterSync implements buffering for a deno.WriterSync object. - * If an error occurs writing to a WriterSync, no more data will be - * accepted and all subsequent writes, and flush(), will return the error. - * After all data has been written, the client should call the - * flush() method to guarantee all data has been forwarded to - * the underlying deno.WriterSync. - */ -export class BufWriterSync extends AbstractBufBase implements WriterSync { - /** return new BufWriterSync unless writer is BufWriterSync */ - static create( - writer: WriterSync, - size: number = DEFAULT_BUF_SIZE, - ): BufWriterSync { - return writer instanceof BufWriterSync - ? writer - : new BufWriterSync(writer, size); - } - - constructor(private writer: WriterSync, size: number = DEFAULT_BUF_SIZE) { - super(); - if (size <= 0) { - size = DEFAULT_BUF_SIZE; - } - this.buf = new Uint8Array(size); - } - - /** Discards any unflushed buffered data, clears any error, and - * resets buffer to write its output to w. - */ - reset(w: WriterSync): void { - this.err = null; - this.usedBufferBytes = 0; - this.writer = w; - } - - /** Flush writes any buffered data to the underlying io.WriterSync. */ - flush(): void { - if (this.err !== null) throw this.err; - if (this.usedBufferBytes === 0) return; - - try { - writeAllSync( - this.writer, - this.buf.subarray(0, this.usedBufferBytes), - ); - } catch (e) { - this.err = e; - throw e; - } - - this.buf = new Uint8Array(this.buf.length); - this.usedBufferBytes = 0; - } - - /** Writes the contents of `data` into the buffer. If the contents won't fully - * fit into the buffer, those bytes that can are copied into the buffer, the - * buffer is the flushed to the writer and the remaining bytes are copied into - * the now empty buffer. - * - * @return the number of bytes written to the buffer. - */ - writeSync(data: Uint8Array): number { - if (this.err !== null) throw this.err; - if (data.length === 0) return 0; - - let totalBytesWritten = 0; - let numBytesWritten = 0; - while (data.byteLength > this.available()) { - if (this.buffered() === 0) { - // Large write, empty buffer. - // Write directly from data to avoid copy. - try { - numBytesWritten = this.writer.writeSync(data); - } catch (e) { - this.err = e; - throw e; - } - } else { - numBytesWritten = copy(data, this.buf, this.usedBufferBytes); - this.usedBufferBytes += numBytesWritten; - this.flush(); - } - totalBytesWritten += numBytesWritten; - data = data.subarray(numBytesWritten); - } - - numBytesWritten = copy(data, this.buf, this.usedBufferBytes); - this.usedBufferBytes += numBytesWritten; - totalBytesWritten += numBytesWritten; - return totalBytesWritten; - } -} - -/** Generate longest proper prefix which is also suffix array. */ -function createLPS(pat: Uint8Array): Uint8Array { - const lps = new Uint8Array(pat.length); - lps[0] = 0; - let prefixEnd = 0; - let i = 1; - while (i < lps.length) { - if (pat[i] == pat[prefixEnd]) { - prefixEnd++; - lps[i] = prefixEnd; - i++; - } else if (prefixEnd === 0) { - lps[i] = 0; - i++; - } else { - prefixEnd = pat[prefixEnd - 1]; - } - } - return lps; -} - -/** Read delimited bytes from a Reader. */ -export async function* readDelim( - reader: Reader, - delim: Uint8Array, -): AsyncIterableIterator { - // Avoid unicode problems - const delimLen = delim.length; - const delimLPS = createLPS(delim); - - let inputBuffer = new Buffer(); - const inspectArr = new Uint8Array(Math.max(1024, delimLen + 1)); - - // Modified KMP - let inspectIndex = 0; - let matchIndex = 0; - while (true) { - const result = await reader.read(inspectArr); - if (result === null) { - // Yield last chunk. - yield inputBuffer.bytes(); - return; - } - if ((result as number) < 0) { - // Discard all remaining and silently fail. - return; - } - const sliceRead = inspectArr.subarray(0, result as number); - await writeAll(inputBuffer, sliceRead); - - let sliceToProcess = inputBuffer.bytes(); - while (inspectIndex < sliceToProcess.length) { - if (sliceToProcess[inspectIndex] === delim[matchIndex]) { - inspectIndex++; - matchIndex++; - if (matchIndex === delimLen) { - // Full match - const matchEnd = inspectIndex - delimLen; - const readyBytes = sliceToProcess.subarray(0, matchEnd); - // Copy - const pendingBytes = sliceToProcess.slice(inspectIndex); - yield readyBytes; - // Reset match, different from KMP. - sliceToProcess = pendingBytes; - inspectIndex = 0; - matchIndex = 0; - } - } else { - if (matchIndex === 0) { - inspectIndex++; - } else { - matchIndex = delimLPS[matchIndex - 1]; - } - } - } - // Keep inspectIndex and matchIndex. - inputBuffer = new Buffer(sliceToProcess); - } -} - -/** Read delimited strings from a Reader. */ -export async function* readStringDelim( - reader: Reader, - delim: string, -): AsyncIterableIterator { - const encoder = new TextEncoder(); - const decoder = new TextDecoder(); - for await (const chunk of readDelim(reader, encoder.encode(delim))) { - yield decoder.decode(chunk); - } -} - -/** Read strings line-by-line from a Reader. */ -export async function* readLines( - reader: Reader, -): AsyncIterableIterator { - for await (let chunk of readStringDelim(reader, "\n")) { - // Finding a CR at the end of the line is evidence of a - // "\r\n" at the end of the line. The "\r" part should be - // removed too. - if (chunk.endsWith("\r")) { - chunk = chunk.slice(0, -1); - } - yield chunk; - } -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/io/ioutil.ts b/src/resources/vendor/deno-land/std@0-93-0/io/ioutil.ts deleted file mode 100644 index d35e0cbb66d..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/io/ioutil.ts +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -import type { BufReader } from "./bufio.ts"; -type Reader = Deno.Reader; -type Writer = Deno.Writer; -import { assert } from "../_util/assert.ts"; - -const DEFAULT_BUFFER_SIZE = 32 * 1024; - -/** - * Copy N size at the most. If read size is lesser than N, then returns nread - * @param r Reader - * @param dest Writer - * @param size Read size - */ -export async function copyN( - r: Reader, - dest: Writer, - size: number, -): Promise { - let bytesRead = 0; - let buf = new Uint8Array(DEFAULT_BUFFER_SIZE); - while (bytesRead < size) { - if (size - bytesRead < DEFAULT_BUFFER_SIZE) { - buf = new Uint8Array(size - bytesRead); - } - const result = await r.read(buf); - const nread = result ?? 0; - bytesRead += nread; - if (nread > 0) { - let n = 0; - while (n < nread) { - n += await dest.write(buf.slice(n, nread)); - } - assert(n === nread, "could not write"); - } - if (result === null) { - break; - } - } - return bytesRead; -} - -/** - * Read big endian 16bit short from BufReader - * @param buf - */ -export async function readShort(buf: BufReader): Promise { - const high = await buf.readByte(); - if (high === null) return null; - const low = await buf.readByte(); - if (low === null) throw new Deno.errors.UnexpectedEof(); - return (high << 8) | low; -} - -/** - * Read big endian 32bit integer from BufReader - * @param buf - */ -export async function readInt(buf: BufReader): Promise { - const high = await readShort(buf); - if (high === null) return null; - const low = await readShort(buf); - if (low === null) throw new Deno.errors.UnexpectedEof(); - return (high << 16) | low; -} - -const MAX_SAFE_INTEGER = BigInt(Number.MAX_SAFE_INTEGER); - -/** - * Read big endian 64bit long from BufReader - * @param buf - */ -export async function readLong(buf: BufReader): Promise { - const high = await readInt(buf); - if (high === null) return null; - const low = await readInt(buf); - if (low === null) throw new Deno.errors.UnexpectedEof(); - const big = (BigInt(high) << 32n) | BigInt(low); - // We probably should provide a similar API that returns BigInt values. - if (big > MAX_SAFE_INTEGER) { - throw new RangeError( - "Long value too big to be represented as a JavaScript number.", - ); - } - return Number(big); -} - -/** - * Slice number into 64bit big endian byte array - * @param d The number to be sliced - * @param dest The sliced array - */ -export function sliceLongToBytes(d: number, dest = new Array(8)): number[] { - let big = BigInt(d); - for (let i = 0; i < 8; i++) { - dest[7 - i] = Number(big & 0xffn); - big >>= 8n; - } - return dest; -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/io/mod.ts b/src/resources/vendor/deno-land/std@0-93-0/io/mod.ts deleted file mode 100644 index 40fd2cb6e71..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/io/mod.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -export * from "./buffer.ts"; -export * from "./bufio.ts"; -export * from "./ioutil.ts"; -export * from "./readers.ts"; -export * from "./streams.ts"; -export * from "./util.ts"; -export * from "./writers.ts"; diff --git a/src/resources/vendor/deno-land/std@0-93-0/io/readers.ts b/src/resources/vendor/deno-land/std@0-93-0/io/readers.ts deleted file mode 100644 index 68552ea47f9..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/io/readers.ts +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// Based on https://github.com/golang/go/blob/0452f9460f50f0f0aba18df43dc2b31906fb66cc/src/io/io.go -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -import { Buffer } from "./buffer.ts"; - -/** Reader utility for strings */ -export class StringReader extends Buffer { - constructor(s: string) { - super(new TextEncoder().encode(s).buffer); - } -} - -/** Reader utility for combining multiple readers */ -export class MultiReader implements Deno.Reader { - private readonly readers: Deno.Reader[]; - private currentIndex = 0; - - constructor(...readers: Deno.Reader[]) { - this.readers = readers; - } - - async read(p: Uint8Array): Promise { - const r = this.readers[this.currentIndex]; - if (!r) return null; - const result = await r.read(p); - if (result === null) { - this.currentIndex++; - return 0; - } - return result; - } -} - -/** - * A `LimitedReader` reads from `reader` but limits the amount of data returned to just `limit` bytes. - * Each call to `read` updates `limit` to reflect the new amount remaining. - * `read` returns `null` when `limit` <= `0` or - * when the underlying `reader` returns `null`. - */ -export class LimitedReader implements Deno.Reader { - constructor(public reader: Deno.Reader, public limit: number) {} - - async read(p: Uint8Array): Promise { - if (this.limit <= 0) { - return null; - } - - if (p.length > this.limit) { - p = p.subarray(0, this.limit); - } - const n = await this.reader.read(p); - if (n == null) { - return null; - } - - this.limit -= n; - return n; - } -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/io/streams.ts b/src/resources/vendor/deno-land/std@0-93-0/io/streams.ts deleted file mode 100644 index 17722342717..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/io/streams.ts +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. - -import { Buffer } from "./buffer.ts"; -import { writeAll } from "./util.ts"; - -/** Create a `Deno.Reader` from an iterable of `Uint8Array`s. - * - * // Server-sent events: Send runtime metrics to the client every second. - * request.respond({ - * headers: new Headers({ "Content-Type": "text/event-stream" }), - * body: readerFromIterable((async function* () { - * while (true) { - * await new Promise((r) => setTimeout(r, 1000)); - * const message = `data: ${JSON.stringify(Deno.metrics())}\n\n`; - * yield new TextEncoder().encode(message); - * } - * })()), - * }); - */ -export function readerFromIterable( - iterable: Iterable | AsyncIterable, -): Deno.Reader { - const iterator: Iterator | AsyncIterator = - (iterable as AsyncIterable)[Symbol.asyncIterator]?.() ?? - (iterable as Iterable)[Symbol.iterator]?.(); - const buffer = new Buffer(); - return { - async read(p: Uint8Array): Promise { - if (buffer.length == 0) { - const result = await iterator.next(); - if (result.done) { - return null; - } else { - if (result.value.byteLength <= p.byteLength) { - p.set(result.value); - return result.value.byteLength; - } - p.set(result.value.subarray(0, p.byteLength)); - await writeAll(buffer, result.value.subarray(p.byteLength)); - return p.byteLength; - } - } else { - const n = await buffer.read(p); - if (n == null) { - return this.read(p); - } - return n; - } - }, - }; -} - -/** Create a `Writer` from a `WritableStreamDefaultReader`. */ -export function writerFromStreamWriter( - streamWriter: WritableStreamDefaultWriter, -): Deno.Writer { - return { - async write(p: Uint8Array): Promise { - await streamWriter.ready; - await streamWriter.write(p); - return p.length; - }, - }; -} - -/** Create a `Reader` from a `ReadableStreamDefaultReader`. */ -export function readerFromStreamReader( - streamReader: ReadableStreamDefaultReader, -): Deno.Reader { - const buffer = new Buffer(); - - return { - async read(p: Uint8Array): Promise { - if (buffer.empty()) { - const res = await streamReader.read(); - if (res.done) { - return null; // EOF - } - - await writeAll(buffer, res.value); - } - - return buffer.read(p); - }, - }; -} - -/** Create a `WritableStream` from a `Writer`. */ -export function writableStreamFromWriter( - writer: Deno.Writer, -): WritableStream { - return new WritableStream({ - async write(chunk) { - await writeAll(writer, chunk); - }, - }); -} - -/** Create a `ReadableStream` from any kind of iterable. - * - * const r1 = readableStreamFromIterable(["foo, bar, baz"]); - * const r2 = readableStreamFromIterable((async function* () { - * await new Promise(((r) => setTimeout(r, 1000))); - * yield "foo"; - * await new Promise(((r) => setTimeout(r, 1000))); - * yield "bar"; - * await new Promise(((r) => setTimeout(r, 1000))); - * yield "baz"; - * })()); -*/ -export function readableStreamFromIterable( - iterable: Iterable | AsyncIterable, -): ReadableStream { - const iterator: Iterator | AsyncIterator = - (iterable as AsyncIterable)[Symbol.asyncIterator]?.() ?? - (iterable as Iterable)[Symbol.iterator]?.(); - return new ReadableStream({ - async pull(controller) { - const { value, done } = await iterator.next(); - - if (done) { - controller.close(); - } else { - controller.enqueue(value); - } - }, - }); -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/io/util.ts b/src/resources/vendor/deno-land/std@0-93-0/io/util.ts deleted file mode 100644 index 58461488a22..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/io/util.ts +++ /dev/null @@ -1,203 +0,0 @@ -import { Buffer } from "./buffer.ts"; - -const DEFAULT_BUFFER_SIZE = 32 * 1024; - -/** Read Reader `r` until EOF (`null`) and resolve to the content as - * Uint8Array`. - * - * ```ts - * - * // Example from stdin - * const stdinContent = await readAll(Deno.stdin); - * - * // Example from file - * const file = await Deno.open("my_file.txt", {read: true}); - * const myFileContent = await readAll(file); - * Deno.close(file.rid); - * - * // Example from buffer - * const myData = new Uint8Array(100); - * // ... fill myData array with data - * const reader = new Buffer(myData.buffer as ArrayBuffer); - * const bufferContent = await readAll(reader); - * ``` - */ -export async function readAll(r: Deno.Reader): Promise { - const buf = new Buffer(); - await buf.readFrom(r); - return buf.bytes(); -} - -/** Synchronously reads Reader `r` until EOF (`null`) and returns the content - * as `Uint8Array`. - * - * ```ts - * // Example from stdin - * const stdinContent = readAllSync(Deno.stdin); - * - * // Example from file - * const file = Deno.openSync("my_file.txt", {read: true}); - * const myFileContent = readAllSync(file); - * Deno.close(file.rid); - * - * // Example from buffer - * const myData = new Uint8Array(100); - * // ... fill myData array with data - * const reader = new Buffer(myData.buffer as ArrayBuffer); - * const bufferContent = readAllSync(reader); - * ``` - */ -export function readAllSync(r: Deno.ReaderSync): Uint8Array { - const buf = new Buffer(); - buf.readFromSync(r); - return buf.bytes(); -} - -/** Write all the content of the array buffer (`arr`) to the writer (`w`). - * - * ```ts - * // Example writing to stdout - * const contentBytes = new TextEncoder().encode("Hello World"); - * await writeAll(Deno.stdout, contentBytes); - * - * // Example writing to file - * const contentBytes = new TextEncoder().encode("Hello World"); - * const file = await Deno.open('test.file', {write: true}); - * await writeAll(file, contentBytes); - * Deno.close(file.rid); - * - * // Example writing to buffer - * const contentBytes = new TextEncoder().encode("Hello World"); - * const writer = new Buffer(); - * await writeAll(writer, contentBytes); - * console.log(writer.bytes().length); // 11 - * ``` - */ -export async function writeAll(w: Deno.Writer, arr: Uint8Array) { - let nwritten = 0; - while (nwritten < arr.length) { - nwritten += await w.write(arr.subarray(nwritten)); - } -} - -/** Synchronously write all the content of the array buffer (`arr`) to the - * writer (`w`). - * - * ```ts - * // Example writing to stdout - * const contentBytes = new TextEncoder().encode("Hello World"); - * writeAllSync(Deno.stdout, contentBytes); - * - * // Example writing to file - * const contentBytes = new TextEncoder().encode("Hello World"); - * const file = Deno.openSync('test.file', {write: true}); - * writeAllSync(file, contentBytes); - * Deno.close(file.rid); - * - * // Example writing to buffer - * const contentBytes = new TextEncoder().encode("Hello World"); - * const writer = new Buffer(); - * writeAllSync(writer, contentBytes); - * console.log(writer.bytes().length); // 11 - * ``` - */ -export function writeAllSync(w: Deno.WriterSync, arr: Uint8Array): void { - let nwritten = 0; - while (nwritten < arr.length) { - nwritten += w.writeSync(arr.subarray(nwritten)); - } -} - -/** Turns a Reader, `r`, into an async iterator. - * - * ```ts - * let f = await Deno.open("/etc/passwd"); - * for await (const chunk of iter(f)) { - * console.log(chunk); - * } - * f.close(); - * ``` - * - * Second argument can be used to tune size of a buffer. - * Default size of the buffer is 32kB. - * - * ```ts - * let f = await Deno.open("/etc/passwd"); - * const iter = iter(f, { - * bufSize: 1024 * 1024 - * }); - * for await (const chunk of iter) { - * console.log(chunk); - * } - * f.close(); - * ``` - * - * Iterator uses an internal buffer of fixed size for efficiency; it returns - * a view on that buffer on each iteration. It is therefore caller's - * responsibility to copy contents of the buffer if needed; otherwise the - * next iteration will overwrite contents of previously returned chunk. - */ -export async function* iter( - r: Deno.Reader, - options?: { - bufSize?: number; - }, -): AsyncIterableIterator { - const bufSize = options?.bufSize ?? DEFAULT_BUFFER_SIZE; - const b = new Uint8Array(bufSize); - while (true) { - const result = await r.read(b); - if (result === null) { - break; - } - - yield b.subarray(0, result); - } -} - -/** Turns a ReaderSync, `r`, into an iterator. - * - * ```ts - * let f = Deno.openSync("/etc/passwd"); - * for (const chunk of iterSync(f)) { - * console.log(chunk); - * } - * f.close(); - * ``` - * - * Second argument can be used to tune size of a buffer. - * Default size of the buffer is 32kB. - * - * ```ts - * let f = await Deno.open("/etc/passwd"); - * const iter = iterSync(f, { - * bufSize: 1024 * 1024 - * }); - * for (const chunk of iter) { - * console.log(chunk); - * } - * f.close(); - * ``` - * - * Iterator uses an internal buffer of fixed size for efficiency; it returns - * a view on that buffer on each iteration. It is therefore caller's - * responsibility to copy contents of the buffer if needed; otherwise the - * next iteration will overwrite contents of previously returned chunk. - */ -export function* iterSync( - r: Deno.ReaderSync, - options?: { - bufSize?: number; - }, -): IterableIterator { - const bufSize = options?.bufSize ?? DEFAULT_BUFFER_SIZE; - const b = new Uint8Array(bufSize); - while (true) { - const result = r.readSync(b); - if (result === null) { - break; - } - - yield b.subarray(0, result); - } -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/io/writers.ts b/src/resources/vendor/deno-land/std@0-93-0/io/writers.ts deleted file mode 100644 index c9570713f25..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/io/writers.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -type Writer = Deno.Writer; -type WriterSync = Deno.WriterSync; - -const decoder = new TextDecoder(); - -/** Writer utility for buffering string chunks */ -export class StringWriter implements Writer, WriterSync { - private chunks: Uint8Array[] = []; - private byteLength = 0; - private cache: string | undefined; - - constructor(private base: string = "") { - const c = new TextEncoder().encode(base); - this.chunks.push(c); - this.byteLength += c.byteLength; - } - - write(p: Uint8Array): Promise { - return Promise.resolve(this.writeSync(p)); - } - - writeSync(p: Uint8Array): number { - this.chunks.push(p); - this.byteLength += p.byteLength; - this.cache = undefined; - return p.byteLength; - } - - toString(): string { - if (this.cache) { - return this.cache; - } - const buf = new Uint8Array(this.byteLength); - let offs = 0; - for (const chunk of this.chunks) { - buf.set(chunk, offs); - offs += chunk.byteLength; - } - this.cache = decoder.decode(buf); - return this.cache; - } -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/path/_constants.ts b/src/resources/vendor/deno-land/std@0-93-0/path/_constants.ts deleted file mode 100644 index 88374ae059f..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/path/_constants.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. - -// Alphabet chars. -export const CHAR_UPPERCASE_A = 65; /* A */ -export const CHAR_LOWERCASE_A = 97; /* a */ -export const CHAR_UPPERCASE_Z = 90; /* Z */ -export const CHAR_LOWERCASE_Z = 122; /* z */ - -// Non-alphabetic chars. -export const CHAR_DOT = 46; /* . */ -export const CHAR_FORWARD_SLASH = 47; /* / */ -export const CHAR_BACKWARD_SLASH = 92; /* \ */ -export const CHAR_VERTICAL_LINE = 124; /* | */ -export const CHAR_COLON = 58; /* : */ -export const CHAR_QUESTION_MARK = 63; /* ? */ -export const CHAR_UNDERSCORE = 95; /* _ */ -export const CHAR_LINE_FEED = 10; /* \n */ -export const CHAR_CARRIAGE_RETURN = 13; /* \r */ -export const CHAR_TAB = 9; /* \t */ -export const CHAR_FORM_FEED = 12; /* \f */ -export const CHAR_EXCLAMATION_MARK = 33; /* ! */ -export const CHAR_HASH = 35; /* # */ -export const CHAR_SPACE = 32; /* */ -export const CHAR_NO_BREAK_SPACE = 160; /* \u00A0 */ -export const CHAR_ZERO_WIDTH_NOBREAK_SPACE = 65279; /* \uFEFF */ -export const CHAR_LEFT_SQUARE_BRACKET = 91; /* [ */ -export const CHAR_RIGHT_SQUARE_BRACKET = 93; /* ] */ -export const CHAR_LEFT_ANGLE_BRACKET = 60; /* < */ -export const CHAR_RIGHT_ANGLE_BRACKET = 62; /* > */ -export const CHAR_LEFT_CURLY_BRACKET = 123; /* { */ -export const CHAR_RIGHT_CURLY_BRACKET = 125; /* } */ -export const CHAR_HYPHEN_MINUS = 45; /* - */ -export const CHAR_PLUS = 43; /* + */ -export const CHAR_DOUBLE_QUOTE = 34; /* " */ -export const CHAR_SINGLE_QUOTE = 39; /* ' */ -export const CHAR_PERCENT = 37; /* % */ -export const CHAR_SEMICOLON = 59; /* ; */ -export const CHAR_CIRCUMFLEX_ACCENT = 94; /* ^ */ -export const CHAR_GRAVE_ACCENT = 96; /* ` */ -export const CHAR_AT = 64; /* @ */ -export const CHAR_AMPERSAND = 38; /* & */ -export const CHAR_EQUAL = 61; /* = */ - -// Digits -export const CHAR_0 = 48; /* 0 */ -export const CHAR_9 = 57; /* 9 */ diff --git a/src/resources/vendor/deno-land/std@0-93-0/path/_interface.ts b/src/resources/vendor/deno-land/std@0-93-0/path/_interface.ts deleted file mode 100644 index d5015cbebed..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/path/_interface.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// This module is browser compatible. - -/** - * A parsed path object generated by path.parse() or consumed by path.format(). - */ -export interface ParsedPath { - /** - * The root of the path such as '/' or 'c:\' - */ - root: string; - /** - * The full directory path such as '/home/user/dir' or 'c:\path\dir' - */ - dir: string; - /** - * The file name including extension (if any) such as 'index.html' - */ - base: string; - /** - * The file extension (if any) such as '.html' - */ - ext: string; - /** - * The file name without extension (if any) such as 'index' - */ - name: string; -} - -export type FormatInputPathObject = Partial; diff --git a/src/resources/vendor/deno-land/std@0-93-0/path/_util.ts b/src/resources/vendor/deno-land/std@0-93-0/path/_util.ts deleted file mode 100644 index c2a23ade61d..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/path/_util.ts +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. - -import type { FormatInputPathObject } from "./_interface.ts"; -import { - CHAR_BACKWARD_SLASH, - CHAR_DOT, - CHAR_FORWARD_SLASH, - CHAR_LOWERCASE_A, - CHAR_LOWERCASE_Z, - CHAR_UPPERCASE_A, - CHAR_UPPERCASE_Z, -} from "./_constants.ts"; - -export function assertPath(path: string): void { - if (typeof path !== "string") { - throw new TypeError( - `Path must be a string. Received ${JSON.stringify(path)}`, - ); - } -} - -export function isPosixPathSeparator(code: number): boolean { - return code === CHAR_FORWARD_SLASH; -} - -export function isPathSeparator(code: number): boolean { - return isPosixPathSeparator(code) || code === CHAR_BACKWARD_SLASH; -} - -export function isWindowsDeviceRoot(code: number): boolean { - return ( - (code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z) || - (code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z) - ); -} - -// Resolves . and .. elements in a path with directory names -export function normalizeString( - path: string, - allowAboveRoot: boolean, - separator: string, - isPathSeparator: (code: number) => boolean, -): string { - let res = ""; - let lastSegmentLength = 0; - let lastSlash = -1; - let dots = 0; - let code: number | undefined; - for (let i = 0, len = path.length; i <= len; ++i) { - if (i < len) code = path.charCodeAt(i); - else if (isPathSeparator(code!)) break; - else code = CHAR_FORWARD_SLASH; - - if (isPathSeparator(code!)) { - if (lastSlash === i - 1 || dots === 1) { - // NOOP - } else if (lastSlash !== i - 1 && dots === 2) { - if ( - res.length < 2 || - lastSegmentLength !== 2 || - res.charCodeAt(res.length - 1) !== CHAR_DOT || - res.charCodeAt(res.length - 2) !== CHAR_DOT - ) { - if (res.length > 2) { - const lastSlashIndex = res.lastIndexOf(separator); - if (lastSlashIndex === -1) { - res = ""; - lastSegmentLength = 0; - } else { - res = res.slice(0, lastSlashIndex); - lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); - } - lastSlash = i; - dots = 0; - continue; - } else if (res.length === 2 || res.length === 1) { - res = ""; - lastSegmentLength = 0; - lastSlash = i; - dots = 0; - continue; - } - } - if (allowAboveRoot) { - if (res.length > 0) res += `${separator}..`; - else res = ".."; - lastSegmentLength = 2; - } - } else { - if (res.length > 0) res += separator + path.slice(lastSlash + 1, i); - else res = path.slice(lastSlash + 1, i); - lastSegmentLength = i - lastSlash - 1; - } - lastSlash = i; - dots = 0; - } else if (code === CHAR_DOT && dots !== -1) { - ++dots; - } else { - dots = -1; - } - } - return res; -} - -export function _format( - sep: string, - pathObject: FormatInputPathObject, -): string { - const dir: string | undefined = pathObject.dir || pathObject.root; - const base: string = pathObject.base || - (pathObject.name || "") + (pathObject.ext || ""); - if (!dir) return base; - if (dir === pathObject.root) return dir + base; - return dir + sep + base; -} - -const WHITESPACE_ENCODINGS: Record = { - "\u0009": "%09", - "\u000A": "%0A", - "\u000B": "%0B", - "\u000C": "%0C", - "\u000D": "%0D", - "\u0020": "%20", -}; - -export function encodeWhitespace(string: string): string { - return string.replaceAll(/[\s]/g, (c) => { - return WHITESPACE_ENCODINGS[c] ?? c; - }); -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/path/common.ts b/src/resources/vendor/deno-land/std@0-93-0/path/common.ts deleted file mode 100644 index 390c04f1db7..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/path/common.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// This module is browser compatible. - -import { SEP } from "./separator.ts"; - -/** Determines the common path from a set of paths, using an optional separator, - * which defaults to the OS default separator. - * - * import { common } from "https://deno.land/std/path/mod.ts"; - * const p = common([ - * "./deno/std/path/mod.ts", - * "./deno/std/fs/mod.ts", - * ]); - * console.log(p); // "./deno/std/" - * - */ -export function common(paths: string[], sep = SEP): string { - const [first = "", ...remaining] = paths; - if (first === "" || remaining.length === 0) { - return first.substring(0, first.lastIndexOf(sep) + 1); - } - const parts = first.split(sep); - - let endOfPrefix = parts.length; - for (const path of remaining) { - const compare = path.split(sep); - for (let i = 0; i < endOfPrefix; i++) { - if (compare[i] !== parts[i]) { - endOfPrefix = i; - } - } - - if (endOfPrefix === 0) { - return ""; - } - } - const prefix = parts.slice(0, endOfPrefix).join(sep); - return prefix.endsWith(sep) ? prefix : `${prefix}${sep}`; -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/path/glob.ts b/src/resources/vendor/deno-land/std@0-93-0/path/glob.ts deleted file mode 100644 index d599c1b88e2..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/path/glob.ts +++ /dev/null @@ -1,387 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// This module is browser compatible. - -import { osType } from "../_util/os.ts"; -import { join, normalize } from "./mod.ts"; -import { SEP, SEP_PATTERN } from "./separator.ts"; - -export interface GlobOptions { - /** Extended glob syntax. - * See https://www.linuxjournal.com/content/bash-extended-globbing. Defaults - * to true. */ - extended?: boolean; - /** Globstar syntax. - * See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option. - * If false, `**` is treated like `*`. Defaults to true. */ - globstar?: boolean; - /** Operating system. Defaults to the native OS. */ - os?: typeof Deno.build.os; -} - -export type GlobToRegExpOptions = GlobOptions; - -// deno-fmt-ignore -const regExpEscapeChars = ["!", "$", "(", ")", "*", "+", ".", "=", "?", "[", "\\", "^", "{", "|"]; -const rangeEscapeChars = ["-", "\\", "]"]; - -/** Convert a glob string to a regular expression. - * - * Tries to match bash glob expansion as closely as possible. - * - * Basic glob syntax: - * - `*` - Matches everything without leaving the path segment. - * - `{foo,bar}` - Matches `foo` or `bar`. - * - `[abcd]` - Matches `a`, `b`, `c` or `d`. - * - `[a-d]` - Matches `a`, `b`, `c` or `d`. - * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`. - * - `[[::]]` - Matches any character belonging to ``. - * - `[[:alnum:]]` - Matches any digit or letter. - * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`. - * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes - * for a complete list of supported character classes. - * - `\` - Escapes the next character for an `os` other than `"windows"`. - * - \` - Escapes the next character for `os` set to `"windows"`. - * - `/` - Path separator. - * - `\` - Additional path separator only for `os` set to `"windows"`. - * - * Extended syntax: - * - Requires `{ extended: true }`. - * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`. - * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same. - * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`. - * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`. - * - `!(foo|bar)` - Matches anything other than `{foo,bar}`. - * - See https://www.linuxjournal.com/content/bash-extended-globbing. - * - * Globstar syntax: - * - Requires `{ globstar: true }`. - * - `**` - Matches any number of any path segments. - * - Must comprise its entire path segment in the provided glob. - * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option. - * - * Note the following properties: - * - The generated `RegExp` is anchored at both start and end. - * - Repeating and trailing separators are tolerated. Trailing separators in the - * provided glob have no meaning and are discarded. - * - Absolute globs will only match absolute paths, etc. - * - Empty globs will match nothing. - * - Any special glob syntax must be contained to one path segment. For example, - * `?(foo|bar/baz)` is invalid. The separator will take precendence and the - * first segment ends with an unclosed group. - * - If a path segment ends with unclosed groups or a dangling escape prefix, a - * parse error has occured. Every character for that segment is taken - * literally in this event. - * - * Limitations: - * - A negative group like `!(foo|bar)` will wrongly be converted to a negative - * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly - * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively, - * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if - * the group occurs not nested at the end of the segment. */ -export function globToRegExp( - glob: string, - { extended = true, globstar: globstarOption = true, os = osType }: - GlobToRegExpOptions = {}, -): RegExp { - if (glob == "") { - return /(?!)/; - } - - const sep = os == "windows" ? "(?:\\\\|/)+" : "/+"; - const sepMaybe = os == "windows" ? "(?:\\\\|/)*" : "/*"; - const seps = os == "windows" ? ["\\", "/"] : ["/"]; - const globstar = os == "windows" - ? "(?:[^\\\\/]*(?:\\\\|/|$)+)*" - : "(?:[^/]*(?:/|$)+)*"; - const wildcard = os == "windows" ? "[^\\\\/]*" : "[^/]*"; - const escapePrefix = os == "windows" ? "`" : "\\"; - - // Remove trailing separators. - let newLength = glob.length; - for (; newLength > 1 && seps.includes(glob[newLength - 1]); newLength--); - glob = glob.slice(0, newLength); - - let regExpString = ""; - - // Terminates correctly. Trust that `j` is incremented every iteration. - for (let j = 0; j < glob.length;) { - let segment = ""; - const groupStack = []; - let inRange = false; - let inEscape = false; - let endsWithSep = false; - let i = j; - - // Terminates with `i` at the non-inclusive end of the current segment. - for (; i < glob.length && !seps.includes(glob[i]); i++) { - if (inEscape) { - inEscape = false; - const escapeChars = inRange ? rangeEscapeChars : regExpEscapeChars; - segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; - continue; - } - - if (glob[i] == escapePrefix) { - inEscape = true; - continue; - } - - if (glob[i] == "[") { - if (!inRange) { - inRange = true; - segment += "["; - if (glob[i + 1] == "!") { - i++; - segment += "^"; - } else if (glob[i + 1] == "^") { - i++; - segment += "\\^"; - } - continue; - } else if (glob[i + 1] == ":") { - let k = i + 1; - let value = ""; - while (glob[k + 1] != null && glob[k + 1] != ":") { - value += glob[k + 1]; - k++; - } - if (glob[k + 1] == ":" && glob[k + 2] == "]") { - i = k + 2; - if (value == "alnum") segment += "\\dA-Za-z"; - else if (value == "alpha") segment += "A-Za-z"; - else if (value == "ascii") segment += "\x00-\x7F"; - else if (value == "blank") segment += "\t "; - else if (value == "cntrl") segment += "\x00-\x1F\x7F"; - else if (value == "digit") segment += "\\d"; - else if (value == "graph") segment += "\x21-\x7E"; - else if (value == "lower") segment += "a-z"; - else if (value == "print") segment += "\x20-\x7E"; - else if (value == "punct") { - segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~"; - } else if (value == "space") segment += "\\s\v"; - else if (value == "upper") segment += "A-Z"; - else if (value == "word") segment += "\\w"; - else if (value == "xdigit") segment += "\\dA-Fa-f"; - continue; - } - } - } - - if (glob[i] == "]" && inRange) { - inRange = false; - segment += "]"; - continue; - } - - if (inRange) { - if (glob[i] == "\\") { - segment += `\\\\`; - } else { - segment += glob[i]; - } - continue; - } - - if ( - glob[i] == ")" && groupStack.length > 0 && - groupStack[groupStack.length - 1] != "BRACE" - ) { - segment += ")"; - const type = groupStack.pop()!; - if (type == "!") { - segment += wildcard; - } else if (type != "@") { - segment += type; - } - continue; - } - - if ( - glob[i] == "|" && groupStack.length > 0 && - groupStack[groupStack.length - 1] != "BRACE" - ) { - segment += "|"; - continue; - } - - if (glob[i] == "+" && extended && glob[i + 1] == "(") { - i++; - groupStack.push("+"); - segment += "(?:"; - continue; - } - - if (glob[i] == "@" && extended && glob[i + 1] == "(") { - i++; - groupStack.push("@"); - segment += "(?:"; - continue; - } - - if (glob[i] == "?") { - if (extended && glob[i + 1] == "(") { - i++; - groupStack.push("?"); - segment += "(?:"; - } else { - segment += "."; - } - continue; - } - - if (glob[i] == "!" && extended && glob[i + 1] == "(") { - i++; - groupStack.push("!"); - segment += "(?!"; - continue; - } - - if (glob[i] == "{") { - groupStack.push("BRACE"); - segment += "(?:"; - continue; - } - - if (glob[i] == "}" && groupStack[groupStack.length - 1] == "BRACE") { - groupStack.pop(); - segment += ")"; - continue; - } - - if (glob[i] == "," && groupStack[groupStack.length - 1] == "BRACE") { - segment += "|"; - continue; - } - - if (glob[i] == "*") { - if (extended && glob[i + 1] == "(") { - i++; - groupStack.push("*"); - segment += "(?:"; - } else { - const prevChar = glob[i - 1]; - let numStars = 1; - while (glob[i + 1] == "*") { - i++; - numStars++; - } - const nextChar = glob[i + 1]; - if ( - globstarOption && numStars == 2 && - [...seps, undefined].includes(prevChar) && - [...seps, undefined].includes(nextChar) - ) { - segment += globstar; - endsWithSep = true; - } else { - segment += wildcard; - } - } - continue; - } - - segment += regExpEscapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; - } - - // Check for unclosed groups or a dangling backslash. - if (groupStack.length > 0 || inRange || inEscape) { - // Parse failure. Take all characters from this segment literally. - segment = ""; - for (const c of glob.slice(j, i)) { - segment += regExpEscapeChars.includes(c) ? `\\${c}` : c; - endsWithSep = false; - } - } - - regExpString += segment; - if (!endsWithSep) { - regExpString += i < glob.length ? sep : sepMaybe; - endsWithSep = true; - } - - // Terminates with `i` at the start of the next segment. - while (seps.includes(glob[i])) i++; - - // Check that the next value of `j` is indeed higher than the current value. - if (!(i > j)) { - throw new Error("Assertion failure: i > j (potential infinite loop)"); - } - j = i; - } - - regExpString = `^${regExpString}$`; - return new RegExp(regExpString); -} - -/** Test whether the given string is a glob */ -export function isGlob(str: string): boolean { - const chars: Record = { "{": "}", "(": ")", "[": "]" }; - const regex = - /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; - - if (str === "") { - return false; - } - - let match: RegExpExecArray | null; - - while ((match = regex.exec(str))) { - if (match[2]) return true; - let idx = match.index + match[0].length; - - // if an open bracket/brace/paren is escaped, - // set the index to the next closing character - const open = match[1]; - const close = open ? chars[open] : null; - if (open && close) { - const n = str.indexOf(close, idx); - if (n !== -1) { - idx = n + 1; - } - } - - str = str.slice(idx); - } - - return false; -} - -/** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */ -export function normalizeGlob( - glob: string, - { globstar = false }: GlobOptions = {}, -): string { - if (glob.match(/\0/g)) { - throw new Error(`Glob contains invalid characters: "${glob}"`); - } - if (!globstar) { - return normalize(glob); - } - const s = SEP_PATTERN.source; - const badParentPattern = new RegExp( - `(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, - "g", - ); - return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, ".."); -} - -/** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */ -export function joinGlobs( - globs: string[], - { extended = false, globstar = false }: GlobOptions = {}, -): string { - if (!globstar || globs.length == 0) { - return join(...globs); - } - if (globs.length === 0) return "."; - let joined: string | undefined; - for (const glob of globs) { - const path = glob; - if (path.length > 0) { - if (!joined) joined = path; - else joined += `${SEP}${path}`; - } - } - if (!joined) return "."; - return normalizeGlob(joined, { extended, globstar }); -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/path/mod.ts b/src/resources/vendor/deno-land/std@0-93-0/path/mod.ts deleted file mode 100644 index 5fd793c75ad..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/path/mod.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright the Browserify authors. MIT License. -// Ported mostly from https://github.com/browserify/path-browserify/ -// This module is browser compatible. - -import { isWindows } from "../_util/os.ts"; -import * as _win32 from "./win32.ts"; -import * as _posix from "./posix.ts"; - -const path = isWindows ? _win32 : _posix; - -export const win32 = _win32; -export const posix = _posix; -export const { - basename, - delimiter, - dirname, - extname, - format, - fromFileUrl, - isAbsolute, - join, - normalize, - parse, - relative, - resolve, - sep, - toFileUrl, - toNamespacedPath, -} = path; - -export * from "./common.ts"; -export { SEP, SEP_PATTERN } from "./separator.ts"; -export * from "./_interface.ts"; -export * from "./glob.ts"; diff --git a/src/resources/vendor/deno-land/std@0-93-0/path/posix.ts b/src/resources/vendor/deno-land/std@0-93-0/path/posix.ts deleted file mode 100644 index dd5777c23f2..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/path/posix.ts +++ /dev/null @@ -1,507 +0,0 @@ -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. - -import type { FormatInputPathObject, ParsedPath } from "./_interface.ts"; -import { CHAR_DOT, CHAR_FORWARD_SLASH } from "./_constants.ts"; - -import { - _format, - assertPath, - encodeWhitespace, - isPosixPathSeparator, - normalizeString, -} from "./_util.ts"; - -export const sep = "/"; -export const delimiter = ":"; - -// path.resolve([from ...], to) -/** - * Resolves `pathSegments` into an absolute path. - * @param pathSegments an array of path segments - */ -export function resolve(...pathSegments: string[]): string { - let resolvedPath = ""; - let resolvedAbsolute = false; - - for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - let path: string; - - if (i >= 0) path = pathSegments[i]; - else { - if (globalThis.Deno == null) { - throw new TypeError("Resolved a relative path without a CWD."); - } - path = Deno.cwd(); - } - - assertPath(path); - - // Skip empty entries - if (path.length === 0) { - continue; - } - - resolvedPath = `${path}/${resolvedPath}`; - resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeString( - resolvedPath, - !resolvedAbsolute, - "/", - isPosixPathSeparator, - ); - - if (resolvedAbsolute) { - if (resolvedPath.length > 0) return `/${resolvedPath}`; - else return "/"; - } else if (resolvedPath.length > 0) return resolvedPath; - else return "."; -} - -/** - * Normalize the `path`, resolving `'..'` and `'.'` segments. - * @param path to be normalized - */ -export function normalize(path: string): string { - assertPath(path); - - if (path.length === 0) return "."; - - const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - const trailingSeparator = - path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH; - - // Normalize the path - path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator); - - if (path.length === 0 && !isAbsolute) path = "."; - if (path.length > 0 && trailingSeparator) path += "/"; - - if (isAbsolute) return `/${path}`; - return path; -} - -/** - * Verifies whether provided path is absolute - * @param path to be verified as absolute - */ -export function isAbsolute(path: string): boolean { - assertPath(path); - return path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH; -} - -/** - * Join all given a sequence of `paths`,then normalizes the resulting path. - * @param paths to be joined and normalized - */ -export function join(...paths: string[]): string { - if (paths.length === 0) return "."; - let joined: string | undefined; - for (let i = 0, len = paths.length; i < len; ++i) { - const path = paths[i]; - assertPath(path); - if (path.length > 0) { - if (!joined) joined = path; - else joined += `/${path}`; - } - } - if (!joined) return "."; - return normalize(joined); -} - -/** - * Return the relative path from `from` to `to` based on current working directory. - * @param from path in current working directory - * @param to path in current working directory - */ -export function relative(from: string, to: string): string { - assertPath(from); - assertPath(to); - - if (from === to) return ""; - - from = resolve(from); - to = resolve(to); - - if (from === to) return ""; - - // Trim any leading backslashes - let fromStart = 1; - const fromEnd = from.length; - for (; fromStart < fromEnd; ++fromStart) { - if (from.charCodeAt(fromStart) !== CHAR_FORWARD_SLASH) break; - } - const fromLen = fromEnd - fromStart; - - // Trim any leading backslashes - let toStart = 1; - const toEnd = to.length; - for (; toStart < toEnd; ++toStart) { - if (to.charCodeAt(toStart) !== CHAR_FORWARD_SLASH) break; - } - const toLen = toEnd - toStart; - - // Compare paths to find the longest common path from root - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for (; i <= length; ++i) { - if (i === length) { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) { - // We get here if `from` is the exact base path for `to`. - // For example: from='/foo/bar'; to='/foo/bar/baz' - return to.slice(toStart + i + 1); - } else if (i === 0) { - // We get here if `from` is the root - // For example: from='/'; to='/foo' - return to.slice(toStart + i); - } - } else if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) { - // We get here if `to` is the exact base path for `from`. - // For example: from='/foo/bar/baz'; to='/foo/bar' - lastCommonSep = i; - } else if (i === 0) { - // We get here if `to` is the root. - // For example: from='/foo'; to='/' - lastCommonSep = 0; - } - } - break; - } - const fromCode = from.charCodeAt(fromStart + i); - const toCode = to.charCodeAt(toStart + i); - if (fromCode !== toCode) break; - else if (fromCode === CHAR_FORWARD_SLASH) lastCommonSep = i; - } - - let out = ""; - // Generate the relative path based on the path difference between `to` - // and `from` - for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { - if (i === fromEnd || from.charCodeAt(i) === CHAR_FORWARD_SLASH) { - if (out.length === 0) out += ".."; - else out += "/.."; - } - } - - // Lastly, append the rest of the destination (`to`) path that comes after - // the common path parts - if (out.length > 0) return out + to.slice(toStart + lastCommonSep); - else { - toStart += lastCommonSep; - if (to.charCodeAt(toStart) === CHAR_FORWARD_SLASH) ++toStart; - return to.slice(toStart); - } -} - -/** - * Resolves path to a namespace path - * @param path to resolve to namespace - */ -export function toNamespacedPath(path: string): string { - // Non-op on posix systems - return path; -} - -/** - * Return the directory name of a `path`. - * @param path to determine name for - */ -export function dirname(path: string): string { - assertPath(path); - if (path.length === 0) return "."; - const hasRoot = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - let end = -1; - let matchedSlash = true; - for (let i = path.length - 1; i >= 1; --i) { - if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - - if (end === -1) return hasRoot ? "/" : "."; - if (hasRoot && end === 1) return "//"; - return path.slice(0, end); -} - -/** - * Return the last portion of a `path`. Trailing directory separators are ignored. - * @param path to process - * @param ext of path directory - */ -export function basename(path: string, ext = ""): string { - if (ext !== undefined && typeof ext !== "string") { - throw new TypeError('"ext" argument must be a string'); - } - assertPath(path); - - let start = 0; - let end = -1; - let matchedSlash = true; - let i: number; - - if (ext !== undefined && ext.length > 0 && ext.length <= path.length) { - if (ext.length === path.length && ext === path) return ""; - let extIdx = ext.length - 1; - let firstNonSlashEnd = -1; - for (i = path.length - 1; i >= 0; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } else { - if (firstNonSlashEnd === -1) { - // We saw the first non-path separator, remember this index in case - // we need it if the extension ends up not matching - matchedSlash = false; - firstNonSlashEnd = i + 1; - } - if (extIdx >= 0) { - // Try to match the explicit extension - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - // We matched the extension, so mark this as the end of our path - // component - end = i; - } - } else { - // Extension does not match, so our result is the entire path - // component - extIdx = -1; - end = firstNonSlashEnd; - } - } - } - } - - if (start === end) end = firstNonSlashEnd; - else if (end === -1) end = path.length; - return path.slice(start, end); - } else { - for (i = path.length - 1; i >= 0; --i) { - if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } else if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // path component - matchedSlash = false; - end = i + 1; - } - } - - if (end === -1) return ""; - return path.slice(start, end); - } -} - -/** - * Return the extension of the `path`. - * @param path with extension - */ -export function extname(path: string): string { - assertPath(path); - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - for (let i = path.length - 1; i >= 0; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - - if ( - startDot === -1 || - end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) - ) { - return ""; - } - return path.slice(startDot, end); -} - -/** - * Generate a path from `FormatInputPathObject` object. - * @param pathObject with path - */ -export function format(pathObject: FormatInputPathObject): string { - if (pathObject === null || typeof pathObject !== "object") { - throw new TypeError( - `The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`, - ); - } - return _format("/", pathObject); -} - -/** - * Return a `ParsedPath` object of the `path`. - * @param path to process - */ -export function parse(path: string): ParsedPath { - assertPath(path); - - const ret: ParsedPath = { root: "", dir: "", base: "", ext: "", name: "" }; - if (path.length === 0) return ret; - const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - let start: number; - if (isAbsolute) { - ret.root = "/"; - start = 1; - } else { - start = 0; - } - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - - // Get non-dir info - for (; i >= start; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - - if ( - startDot === -1 || - end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) - ) { - if (end !== -1) { - if (startPart === 0 && isAbsolute) { - ret.base = ret.name = path.slice(1, end); - } else { - ret.base = ret.name = path.slice(startPart, end); - } - } - } else { - if (startPart === 0 && isAbsolute) { - ret.name = path.slice(1, startDot); - ret.base = path.slice(1, end); - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - } - ret.ext = path.slice(startDot, end); - } - - if (startPart > 0) ret.dir = path.slice(0, startPart - 1); - else if (isAbsolute) ret.dir = "/"; - - return ret; -} - -/** - * Converts a file URL to a path string. - * - * fromFileUrl("file:///home/foo"); // "/home/foo" - * @param url of a file URL - */ -export function fromFileUrl(url: string | URL): string { - url = url instanceof URL ? url : new URL(url); - if (url.protocol != "file:") { - throw new TypeError("Must be a file URL."); - } - return decodeURIComponent( - url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"), - ); -} - -/** - * Converts a path string to a file URL. - * - * toFileUrl("/home/foo"); // new URL("file:///home/foo") - * @param path to convert to file URL - */ -export function toFileUrl(path: string): URL { - if (!isAbsolute(path)) { - throw new TypeError("Must be an absolute path."); - } - const url = new URL("file:///"); - url.pathname = encodeWhitespace( - path.replace(/%/g, "%25").replace(/\\/g, "%5C"), - ); - return url; -} diff --git a/src/resources/vendor/deno-land/std@0-93-0/path/separator.ts b/src/resources/vendor/deno-land/std@0-93-0/path/separator.ts deleted file mode 100644 index d897e07e681..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/path/separator.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// This module is browser compatible. - -import { isWindows } from "../_util/os.ts"; - -export const SEP = isWindows ? "\\" : "/"; -export const SEP_PATTERN = isWindows ? /[\\/]+/ : /\/+/; diff --git a/src/resources/vendor/deno-land/std@0-93-0/path/win32.ts b/src/resources/vendor/deno-land/std@0-93-0/path/win32.ts deleted file mode 100644 index 3afafd1f28b..00000000000 --- a/src/resources/vendor/deno-land/std@0-93-0/path/win32.ts +++ /dev/null @@ -1,1002 +0,0 @@ -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. - -import type { FormatInputPathObject, ParsedPath } from "./_interface.ts"; -import { - CHAR_BACKWARD_SLASH, - CHAR_COLON, - CHAR_DOT, - CHAR_QUESTION_MARK, -} from "./_constants.ts"; - -import { - _format, - assertPath, - encodeWhitespace, - isPathSeparator, - isWindowsDeviceRoot, - normalizeString, -} from "./_util.ts"; -import { assert } from "../_util/assert.ts"; - -export const sep = "\\"; -export const delimiter = ";"; - -/** - * Resolves path segments into a `path` - * @param pathSegments to process to path - */ -export function resolve(...pathSegments: string[]): string { - let resolvedDevice = ""; - let resolvedTail = ""; - let resolvedAbsolute = false; - - for (let i = pathSegments.length - 1; i >= -1; i--) { - let path: string; - if (i >= 0) { - path = pathSegments[i]; - } else if (!resolvedDevice) { - if (globalThis.Deno == null) { - throw new TypeError("Resolved a drive-letter-less path without a CWD."); - } - path = Deno.cwd(); - } else { - if (globalThis.Deno == null) { - throw new TypeError("Resolved a relative path without a CWD."); - } - // Windows has the concept of drive-specific current working - // directories. If we've resolved a drive letter but not yet an - // absolute path, get cwd for that drive, or the process cwd if - // the drive cwd is not available. We're sure the device is not - // a UNC path at this points, because UNC paths are always absolute. - path = Deno.env.get(`=${resolvedDevice}`) || Deno.cwd(); - - // Verify that a cwd was found and that it actually points - // to our drive. If not, default to the drive's root. - if ( - path === undefined || - path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\` - ) { - path = `${resolvedDevice}\\`; - } - } - - assertPath(path); - - const len = path.length; - - // Skip empty entries - if (len === 0) continue; - - let rootEnd = 0; - let device = ""; - let isAbsolute = false; - const code = path.charCodeAt(0); - - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - - // If we started with a separator, we know we at least have an - // absolute path of some kind (UNC or otherwise) - isAbsolute = true; - - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - // Matched! - last = j; - // Match 1 or more path separators - for (; j < len; ++j) { - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - device = `\\\\${firstPart}\\${path.slice(last)}`; - rootEnd = j; - } else if (j !== last) { - // We matched a UNC root with leftovers - - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } else { - rootEnd = 1; - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - - if (path.charCodeAt(1) === CHAR_COLON) { - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) { - // Treat separator following drive name as an absolute path - // indicator - isAbsolute = true; - rootEnd = 3; - } - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator - rootEnd = 1; - isAbsolute = true; - } - - if ( - device.length > 0 && - resolvedDevice.length > 0 && - device.toLowerCase() !== resolvedDevice.toLowerCase() - ) { - // This path points to another device so it is not applicable - continue; - } - - if (resolvedDevice.length === 0 && device.length > 0) { - resolvedDevice = device; - } - if (!resolvedAbsolute) { - resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`; - resolvedAbsolute = isAbsolute; - } - - if (resolvedAbsolute && resolvedDevice.length > 0) break; - } - - // At this point the path should be resolved to a full absolute path, - // but handle relative paths to be safe (might happen when process.cwd() - // fails) - - // Normalize the tail path - resolvedTail = normalizeString( - resolvedTail, - !resolvedAbsolute, - "\\", - isPathSeparator, - ); - - return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || "."; -} - -/** - * Normalizes a `path` - * @param path to normalize - */ -export function normalize(path: string): string { - assertPath(path); - const len = path.length; - if (len === 0) return "."; - let rootEnd = 0; - let device: string | undefined; - let isAbsolute = false; - const code = path.charCodeAt(0); - - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - - // If we started with a separator, we know we at least have an absolute - // path of some kind (UNC or otherwise) - isAbsolute = true; - - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - // Matched! - last = j; - // Match 1 or more path separators - for (; j < len; ++j) { - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - // Return the normalized version of the UNC root since there - // is nothing left to process - - return `\\\\${firstPart}\\${path.slice(last)}\\`; - } else if (j !== last) { - // We matched a UNC root with leftovers - - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } else { - rootEnd = 1; - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - - if (path.charCodeAt(1) === CHAR_COLON) { - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) { - // Treat separator following drive name as an absolute path - // indicator - isAbsolute = true; - rootEnd = 3; - } - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator, exit early to avoid unnecessary - // work - return "\\"; - } - - let tail: string; - if (rootEnd < len) { - tail = normalizeString( - path.slice(rootEnd), - !isAbsolute, - "\\", - isPathSeparator, - ); - } else { - tail = ""; - } - if (tail.length === 0 && !isAbsolute) tail = "."; - if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) { - tail += "\\"; - } - if (device === undefined) { - if (isAbsolute) { - if (tail.length > 0) return `\\${tail}`; - else return "\\"; - } else if (tail.length > 0) { - return tail; - } else { - return ""; - } - } else if (isAbsolute) { - if (tail.length > 0) return `${device}\\${tail}`; - else return `${device}\\`; - } else if (tail.length > 0) { - return device + tail; - } else { - return device; - } -} - -/** - * Verifies whether path is absolute - * @param path to verify - */ -export function isAbsolute(path: string): boolean { - assertPath(path); - const len = path.length; - if (len === 0) return false; - - const code = path.charCodeAt(0); - if (isPathSeparator(code)) { - return true; - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - - if (len > 2 && path.charCodeAt(1) === CHAR_COLON) { - if (isPathSeparator(path.charCodeAt(2))) return true; - } - } - return false; -} - -/** - * Join all given a sequence of `paths`,then normalizes the resulting path. - * @param paths to be joined and normalized - */ -export function join(...paths: string[]): string { - const pathsCount = paths.length; - if (pathsCount === 0) return "."; - - let joined: string | undefined; - let firstPart: string | null = null; - for (let i = 0; i < pathsCount; ++i) { - const path = paths[i]; - assertPath(path); - if (path.length > 0) { - if (joined === undefined) joined = firstPart = path; - else joined += `\\${path}`; - } - } - - if (joined === undefined) return "."; - - // Make sure that the joined path doesn't start with two slashes, because - // normalize() will mistake it for an UNC path then. - // - // This step is skipped when it is very clear that the user actually - // intended to point at an UNC path. This is assumed when the first - // non-empty string arguments starts with exactly two slashes followed by - // at least one more non-slash character. - // - // Note that for normalize() to treat a path as an UNC path it needs to - // have at least 2 components, so we don't filter for that here. - // This means that the user can use join to construct UNC paths from - // a server name and a share name; for example: - // path.join('//server', 'share') -> '\\\\server\\share\\') - let needsReplace = true; - let slashCount = 0; - assert(firstPart != null); - if (isPathSeparator(firstPart.charCodeAt(0))) { - ++slashCount; - const firstLen = firstPart.length; - if (firstLen > 1) { - if (isPathSeparator(firstPart.charCodeAt(1))) { - ++slashCount; - if (firstLen > 2) { - if (isPathSeparator(firstPart.charCodeAt(2))) ++slashCount; - else { - // We matched a UNC path in the first part - needsReplace = false; - } - } - } - } - } - if (needsReplace) { - // Find any more consecutive slashes we need to replace - for (; slashCount < joined.length; ++slashCount) { - if (!isPathSeparator(joined.charCodeAt(slashCount))) break; - } - - // Replace the slashes if needed - if (slashCount >= 2) joined = `\\${joined.slice(slashCount)}`; - } - - return normalize(joined); -} - -/** - * It will solve the relative path from `from` to `to`, for instance: - * from = 'C:\\orandea\\test\\aaa' - * to = 'C:\\orandea\\impl\\bbb' - * The output of the function should be: '..\\..\\impl\\bbb' - * @param from relative path - * @param to relative path - */ -export function relative(from: string, to: string): string { - assertPath(from); - assertPath(to); - - if (from === to) return ""; - - const fromOrig = resolve(from); - const toOrig = resolve(to); - - if (fromOrig === toOrig) return ""; - - from = fromOrig.toLowerCase(); - to = toOrig.toLowerCase(); - - if (from === to) return ""; - - // Trim any leading backslashes - let fromStart = 0; - let fromEnd = from.length; - for (; fromStart < fromEnd; ++fromStart) { - if (from.charCodeAt(fromStart) !== CHAR_BACKWARD_SLASH) break; - } - // Trim trailing backslashes (applicable to UNC paths only) - for (; fromEnd - 1 > fromStart; --fromEnd) { - if (from.charCodeAt(fromEnd - 1) !== CHAR_BACKWARD_SLASH) break; - } - const fromLen = fromEnd - fromStart; - - // Trim any leading backslashes - let toStart = 0; - let toEnd = to.length; - for (; toStart < toEnd; ++toStart) { - if (to.charCodeAt(toStart) !== CHAR_BACKWARD_SLASH) break; - } - // Trim trailing backslashes (applicable to UNC paths only) - for (; toEnd - 1 > toStart; --toEnd) { - if (to.charCodeAt(toEnd - 1) !== CHAR_BACKWARD_SLASH) break; - } - const toLen = toEnd - toStart; - - // Compare paths to find the longest common path from root - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for (; i <= length; ++i) { - if (i === length) { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) { - // We get here if `from` is the exact base path for `to`. - // For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz' - return toOrig.slice(toStart + i + 1); - } else if (i === 2) { - // We get here if `from` is the device root. - // For example: from='C:\\'; to='C:\\foo' - return toOrig.slice(toStart + i); - } - } - if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) { - // We get here if `to` is the exact base path for `from`. - // For example: from='C:\\foo\\bar'; to='C:\\foo' - lastCommonSep = i; - } else if (i === 2) { - // We get here if `to` is the device root. - // For example: from='C:\\foo\\bar'; to='C:\\' - lastCommonSep = 3; - } - } - break; - } - const fromCode = from.charCodeAt(fromStart + i); - const toCode = to.charCodeAt(toStart + i); - if (fromCode !== toCode) break; - else if (fromCode === CHAR_BACKWARD_SLASH) lastCommonSep = i; - } - - // We found a mismatch before the first common path separator was seen, so - // return the original `to`. - if (i !== length && lastCommonSep === -1) { - return toOrig; - } - - let out = ""; - if (lastCommonSep === -1) lastCommonSep = 0; - // Generate the relative path based on the path difference between `to` and - // `from` - for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { - if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) { - if (out.length === 0) out += ".."; - else out += "\\.."; - } - } - - // Lastly, append the rest of the destination (`to`) path that comes after - // the common path parts - if (out.length > 0) { - return out + toOrig.slice(toStart + lastCommonSep, toEnd); - } else { - toStart += lastCommonSep; - if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) ++toStart; - return toOrig.slice(toStart, toEnd); - } -} - -/** - * Resolves path to a namespace path - * @param path to resolve to namespace - */ -export function toNamespacedPath(path: string): string { - // Note: this will *probably* throw somewhere. - if (typeof path !== "string") return path; - if (path.length === 0) return ""; - - const resolvedPath = resolve(path); - - if (resolvedPath.length >= 3) { - if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) { - // Possible UNC root - - if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) { - const code = resolvedPath.charCodeAt(2); - if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) { - // Matched non-long UNC root, convert the path to a long UNC path - return `\\\\?\\UNC\\${resolvedPath.slice(2)}`; - } - } - } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0))) { - // Possible device root - - if ( - resolvedPath.charCodeAt(1) === CHAR_COLON && - resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH - ) { - // Matched device root, convert the path to a long UNC path - return `\\\\?\\${resolvedPath}`; - } - } - } - - return path; -} - -/** - * Return the directory name of a `path`. - * @param path to determine name for - */ -export function dirname(path: string): string { - assertPath(path); - const len = path.length; - if (len === 0) return "."; - let rootEnd = -1; - let end = -1; - let matchedSlash = true; - let offset = 0; - const code = path.charCodeAt(0); - - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - - rootEnd = offset = 1; - - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more path separators - for (; j < len; ++j) { - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - return path; - } - if (j !== last) { - // We matched a UNC root with leftovers - - // Offset by 1 to include the separator after the UNC root to - // treat it as a "normal root" on top of a (UNC) root - rootEnd = offset = j + 1; - } - } - } - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - - if (path.charCodeAt(1) === CHAR_COLON) { - rootEnd = offset = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) rootEnd = offset = 3; - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator, exit early to avoid - // unnecessary work - return path; - } - - for (let i = len - 1; i >= offset; --i) { - if (isPathSeparator(path.charCodeAt(i))) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - - if (end === -1) { - if (rootEnd === -1) return "."; - else end = rootEnd; - } - return path.slice(0, end); -} - -/** - * Return the last portion of a `path`. Trailing directory separators are ignored. - * @param path to process - * @param ext of path directory - */ -export function basename(path: string, ext = ""): string { - if (ext !== undefined && typeof ext !== "string") { - throw new TypeError('"ext" argument must be a string'); - } - - assertPath(path); - - let start = 0; - let end = -1; - let matchedSlash = true; - let i: number; - - // Check for a drive letter prefix so as not to mistake the following - // path separator as an extra separator at the end of the path that can be - // disregarded - if (path.length >= 2) { - const drive = path.charCodeAt(0); - if (isWindowsDeviceRoot(drive)) { - if (path.charCodeAt(1) === CHAR_COLON) start = 2; - } - } - - if (ext !== undefined && ext.length > 0 && ext.length <= path.length) { - if (ext.length === path.length && ext === path) return ""; - let extIdx = ext.length - 1; - let firstNonSlashEnd = -1; - for (i = path.length - 1; i >= start; --i) { - const code = path.charCodeAt(i); - if (isPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } else { - if (firstNonSlashEnd === -1) { - // We saw the first non-path separator, remember this index in case - // we need it if the extension ends up not matching - matchedSlash = false; - firstNonSlashEnd = i + 1; - } - if (extIdx >= 0) { - // Try to match the explicit extension - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - // We matched the extension, so mark this as the end of our path - // component - end = i; - } - } else { - // Extension does not match, so our result is the entire path - // component - extIdx = -1; - end = firstNonSlashEnd; - } - } - } - } - - if (start === end) end = firstNonSlashEnd; - else if (end === -1) end = path.length; - return path.slice(start, end); - } else { - for (i = path.length - 1; i >= start; --i) { - if (isPathSeparator(path.charCodeAt(i))) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } else if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // path component - matchedSlash = false; - end = i + 1; - } - } - - if (end === -1) return ""; - return path.slice(start, end); - } -} - -/** - * Return the extension of the `path`. - * @param path with extension - */ -export function extname(path: string): string { - assertPath(path); - let start = 0; - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - - // Check for a drive letter prefix so as not to mistake the following - // path separator as an extra separator at the end of the path that can be - // disregarded - - if ( - path.length >= 2 && - path.charCodeAt(1) === CHAR_COLON && - isWindowsDeviceRoot(path.charCodeAt(0)) - ) { - start = startPart = 2; - } - - for (let i = path.length - 1; i >= start; --i) { - const code = path.charCodeAt(i); - if (isPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - - if ( - startDot === -1 || - end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) - ) { - return ""; - } - return path.slice(startDot, end); -} - -/** - * Generate a path from `FormatInputPathObject` object. - * @param pathObject with path - */ -export function format(pathObject: FormatInputPathObject): string { - if (pathObject === null || typeof pathObject !== "object") { - throw new TypeError( - `The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`, - ); - } - return _format("\\", pathObject); -} - -/** - * Return a `ParsedPath` object of the `path`. - * @param path to process - */ -export function parse(path: string): ParsedPath { - assertPath(path); - - const ret: ParsedPath = { root: "", dir: "", base: "", ext: "", name: "" }; - - const len = path.length; - if (len === 0) return ret; - - let rootEnd = 0; - let code = path.charCodeAt(0); - - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - - rootEnd = 1; - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more path separators - for (; j < len; ++j) { - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - - rootEnd = j; - } else if (j !== last) { - // We matched a UNC root with leftovers - - rootEnd = j + 1; - } - } - } - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - - if (path.charCodeAt(1) === CHAR_COLON) { - rootEnd = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) { - if (len === 3) { - // `path` contains just a drive root, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - return ret; - } - rootEnd = 3; - } - } else { - // `path` contains just a drive root, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - return ret; - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - return ret; - } - - if (rootEnd > 0) ret.root = path.slice(0, rootEnd); - - let startDot = -1; - let startPart = rootEnd; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - - // Get non-dir info - for (; i >= rootEnd; --i) { - code = path.charCodeAt(i); - if (isPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - - if ( - startDot === -1 || - end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) - ) { - if (end !== -1) { - ret.base = ret.name = path.slice(startPart, end); - } - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - ret.ext = path.slice(startDot, end); - } - - // If the directory is the root, use the entire root as the `dir` including - // the trailing slash if any (`C:\abc` -> `C:\`). Otherwise, strip out the - // trailing slash (`C:\abc\def` -> `C:\abc`). - if (startPart > 0 && startPart !== rootEnd) { - ret.dir = path.slice(0, startPart - 1); - } else ret.dir = ret.root; - - return ret; -} - -/** - * Converts a file URL to a path string. - * - * fromFileUrl("file:///home/foo"); // "\\home\\foo" - * fromFileUrl("file:///C:/Users/foo"); // "C:\\Users\\foo" - * fromFileUrl("file://localhost/home/foo"); // "\\\\localhost\\home\\foo" - * @param url of a file URL - */ -export function fromFileUrl(url: string | URL): string { - url = url instanceof URL ? url : new URL(url); - if (url.protocol != "file:") { - throw new TypeError("Must be a file URL."); - } - let path = decodeURIComponent( - url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25"), - ).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\"); - if (url.hostname != "") { - // Note: The `URL` implementation guarantees that the drive letter and - // hostname are mutually exclusive. Otherwise it would not have been valid - // to append the hostname and path like this. - path = `\\\\${url.hostname}${path}`; - } - return path; -} - -/** - * Converts a path string to a file URL. - * - * toFileUrl("\\home\\foo"); // new URL("file:///home/foo") - * toFileUrl("C:\\Users\\foo"); // new URL("file:///C:/Users/foo") - * toFileUrl("\\\\127.0.0.1\\home\\foo"); // new URL("file://127.0.0.1/home/foo") - * @param path to convert to file URL - */ -export function toFileUrl(path: string): URL { - if (!isAbsolute(path)) { - throw new TypeError("Must be an absolute path."); - } - const [, hostname, pathname] = path.match( - /^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/, - )!; - const url = new URL("file:///"); - url.pathname = encodeWhitespace(pathname.replace(/%/g, "%25")); - if (hostname != null && hostname != "localhost") { - url.hostname = hostname; - if (!url.hostname) { - throw new TypeError("Invalid hostname."); - } - } - return url; -} diff --git a/src/resources/vendor/deno-land/x/cache@0-2-12/deps.ts b/src/resources/vendor/deno-land/x/cache@0-2-12/deps.ts deleted file mode 100644 index b956c1853bf..00000000000 --- a/src/resources/vendor/deno-land/x/cache@0-2-12/deps.ts +++ /dev/null @@ -1,13 +0,0 @@ -export { - dirname, - extname, - fromFileUrl, - join, - resolve, - toFileUrl, -} from "https://deno.land/std@0.91.0/path/mod.ts"; - -export { ensureDir } from "https://deno.land/std@0.91.0/fs/ensure_dir.ts"; -export { exists, existsSync } from "https://deno.land/std@0.91.0/fs/exists.ts"; - -export { createHash } from "https://deno.land/std@0.91.0/hash/mod.ts"; diff --git a/src/resources/vendor/deno-land/x/cache@0-2-12/directories.ts b/src/resources/vendor/deno-land/x/cache@0-2-12/directories.ts deleted file mode 100644 index 009edcbd8e2..00000000000 --- a/src/resources/vendor/deno-land/x/cache@0-2-12/directories.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { join, resolve } from "./deps.ts"; - -const POSIX_HOME = "HOME"; - -export function cachedir(): string { - const env = Deno.env.get; - const os = Deno.build.os; - - const deno = env("DENO_DIR"); - - if (deno) return resolve(deno); - - let home: string | undefined; - let path: string; - switch (os) { - case "darwin": - home = env(POSIX_HOME); - path = join("Library", "Caches", "deno"); - break; - - case "windows": - home = env("LOCALAPPDATA"); - home = home ?? env("USERPROFILE"); - path = "deno"; - break; - - default: { - const xdg = env("XDG_CACHE_HOME"); - home = xdg ?? env(POSIX_HOME); - path = xdg ? "deno" : join(".cache", "deno"); - break; - } - } - - path = home ? path : ".deno"; - if (!home) return path; - return resolve(join(home, path)); -} - -export function tmpdir(): string { - const env = Deno.env.get; - const os = Deno.build.os; - - const tmp = env("TMPDIR") ?? env("TEMP") ?? env("TMP"); - if (tmp) return resolve(tmp); - - switch (os) { - case "windows": - return resolve( - join(env("HOMEDRIVE") ?? env("SYSTEMDRIVE") ?? "C:", "TEMP"), - ); - default: // to support other unix-like systems in late deno releases - // case "linux": - // case "darwin": - return resolve("/tmp"); - } -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/mod.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/mod.ts deleted file mode 100644 index b724f3e1435..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/mod.ts +++ /dev/null @@ -1,3 +0,0 @@ -import puppeteer from "./src/mod.ts"; -export default puppeteer; -export * from "./vendor/puppeteer-core/puppeteer/api-docs-entry.js"; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/BrowserFetcher.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/BrowserFetcher.ts deleted file mode 100644 index 2acdcf21f11..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/BrowserFetcher.ts +++ /dev/null @@ -1,572 +0,0 @@ -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Product } from "../../vendor/puppeteer-core/puppeteer/common/Product.js"; -import { debug } from "../../vendor/puppeteer-core/puppeteer/common/Debug.js"; -import { assert } from "../../vendor/puppeteer-core/puppeteer/common/assert.js"; -import { - copyDir, - exists, - existsSync, - pathJoin, - pathResolve, - sprintf, -} from "../../vendor/puppeteer-core/vendor/std.ts"; -import { readZip } from "../../vendor/puppeteer-core/vendor/zip/mod.ts"; -import { cachedir } from "../../vendor/puppeteer-core/vendor/cache.ts"; - -const debugFetcher = debug(`puppeteer:fetcher`); - -const downloadURLs = { - chrome: { - linux: "%s/chromium-browser-snapshots/Linux_x64/%d/%s.zip", - mac: "%s/chromium-browser-snapshots/Mac/%d/%s.zip", - win32: "%s/chromium-browser-snapshots/Win/%d/%s.zip", - win64: "%s/chromium-browser-snapshots/Win_x64/%d/%s.zip", - }, - firefox: { - linux: "%s/firefox-%s.en-US.%s-x86_64.tar.bz2", - mac: "%s/firefox-%s.en-US.%s.dmg", - win32: "%s/firefox-%s.en-US.%s.zip", - win64: "%s/firefox-%s.en-US.%s.zip", - }, -} as const; - -const browserConfig = { - chrome: { - host: "https://storage.googleapis.com", - destination: "chromium", - }, - firefox: { - host: - "https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central", - destination: "firefox", - }, -} as const; - -/** - * Supported platforms. - * @public - */ -export type Platform = "linux" | "mac" | "win32" | "win64"; - -function archiveName( - product: Product, - platform: Platform, - revision: string -): string { - if (product === "chrome") { - if (platform === "linux") return "chrome-linux"; - if (platform === "mac") return "chrome-mac"; - if (platform === "win32" || platform === "win64") { - // Windows archive name changed at r591479. - return parseInt(revision, 10) > 591479 ? "chrome-win" : "chrome-win32"; - } - } else if (product === "firefox") { - return platform; - } - throw new Error(`Unknown product: ${product}`); -} - -/** - * @internal - */ -function downloadURL( - product: Product, - platform: Platform, - host: string, - revision: string -): string { - const url = sprintf( - downloadURLs[product][platform], - host, - revision, - archiveName(product, platform, revision) - ); - return url; -} - -/** - * @internal - */ -async function handleArm64(): Promise { - const stats = await Deno.stat("/usr/bin/chromium-browser"); - if (stats === undefined) { - console.error(`The chromium binary is not available for arm64: `); - console.error(`If you are on Ubuntu, you can install with: `); - console.error(`\n apt-get install chromium-browser\n`); - throw new Error(); - } -} - -/** - * @public - */ -export interface BrowserFetcherOptions { - platform?: Platform; - product?: string; - path?: string; - host?: string; -} - -/** - * @public - */ -export interface BrowserFetcherRevisionInfo { - folderPath: string; - executablePath: string; - url: string; - local: boolean; - revision: string; - product: string; -} -/** - * BrowserFetcher can download and manage different versions of Chromium and Firefox. - * - * @remarks - * BrowserFetcher operates on revision strings that specify a precise version of Chromium, e.g. `"533271"`. Revision strings can be obtained from {@link http://omahaproxy.appspot.com/ | omahaproxy.appspot.com}. - * In the Firefox case, BrowserFetcher downloads Firefox Nightly and - * operates on version numbers such as `"75"`. - * - * @example - * An example of using BrowserFetcher to download a specific version of Chromium - * and running Puppeteer against it: - * - * ```js - * const browserFetcher = puppeteer.createBrowserFetcher(); - * const revisionInfo = await browserFetcher.download('533271'); - * const browser = await puppeteer.launch({executablePath: revisionInfo.executablePath}) - * ``` - * - * **NOTE** BrowserFetcher is not designed to work concurrently with other - * instances of BrowserFetcher that share the same downloads directory. - * - * @public - */ - -export class BrowserFetcher { - private _product: Product; - private _downloadsFolder: string; - private _downloadHost: string; - private _platform!: Platform; - - /** - * @internal - */ - constructor(options: BrowserFetcherOptions = {}) { - this._product = (options.product || "chrome").toLowerCase() as Product; - assert( - this._product === "chrome" || this._product === "firefox", - `Unknown product: "${options.product}"` - ); - - this._downloadsFolder = - options.path || - pathJoin( - cachedir(), - "deno_puppeteer", - browserConfig[this._product].destination - ); - this._downloadHost = options.host || browserConfig[this._product].host; - this.setPlatform(options.platform); - assert( - downloadURLs[this._product][this._platform], - "Unsupported platform: " + this._platform - ); - } - - private setPlatform(platformFromOptions?: Platform): void { - if (platformFromOptions) { - this._platform = platformFromOptions; - return; - } - - const platform = Deno.build.os; - if (platform === "darwin") this._platform = "mac"; - else if (platform === "linux") this._platform = "linux"; - else if (platform === "windows") { - this._platform = Deno.build.arch === "x86_64" ? "win64" : "win32"; - } else assert(this._platform, "Unsupported platform: " + Deno.build.os); - } - - /** - * @returns Returns the current `Platform`. - */ - platform(): Platform { - return this._platform; - } - - /** - * @returns Returns the current `Product`. - */ - product(): Product { - return this._product; - } - - /** - * @returns The download host being used. - */ - host(): string { - return this._downloadHost; - } - - /** - * Initiates a HEAD request to check if the revision is available. - * @remarks - * This method is affected by the current `product`. - * @param revision - The revision to check availability for. - * @returns A promise that resolves to `true` if the revision could be downloaded - * from the host. - */ - async canDownload(revision: string): Promise { - const url = downloadURL( - this._product, - this._platform, - this._downloadHost, - revision - ); - const req = await fetch(url, { method: "head" }); - return req.status == 200; - } - - /** - * Initiates a GET request to download the revision from the host. - * @remarks - * This method is affected by the current `product`. - * @param revision - The revision to download. - * @param progressCallback - A function that will be called with two arguments: - * How many bytes have been downloaded and the total number of bytes of the download. - * @returns A promise with revision information when the revision is downloaded - * and extracted. - */ - async download( - revision: string, - progressCallback: (x: number, y: number) => void = (): void => {} - ): Promise { - const url = downloadURL( - this._product, - this._platform, - this._downloadHost, - revision - ); - const fileName = url.split("/").pop()!; - const archivePath = pathJoin(this._downloadsFolder, fileName); - const outputPath = this._getFolderPath(revision); - if (await exists(outputPath)) return this.revisionInfo(revision); - if (!(await exists(this._downloadsFolder))) { - await Deno.mkdir(this._downloadsFolder, { recursive: true }); - } - if ((Deno.build.arch as string) === "arm64") { - // handleArm64(); - // return; - console.error("arm64 downloads not supported."); - console.error( - "Use PUPPETEER_EXECUTABLE_PATH to specify an executable path." - ); - throw new Error(); - } - try { - await downloadFile(url, archivePath, progressCallback); - await install(archivePath, outputPath); - } finally { - if (await exists(archivePath)) { - await Deno.remove(archivePath, { recursive: true }); - } - } - const revisionInfo = this.revisionInfo(revision); - if (revisionInfo && Deno.build.os !== "windows") { - await Deno.chmod(revisionInfo.executablePath, 0o755); - if (Deno.build.os === "darwin" && this._product === "chrome") { - await macOSMakeChromiumHelpersExecutable(revisionInfo.executablePath); - } - } - return revisionInfo; - } - - /** - * @remarks - * This method is affected by the current `product`. - * @returns A promise with a list of all revision strings (for the current `product`) - * available locally on disk. - */ - async localRevisions(): Promise { - if (!(await exists(this._downloadsFolder))) return []; - const fileNames = []; - for await (const file of Deno.readDir(this._downloadsFolder)) { - fileNames.push(file.name); - } - return fileNames - .map((fileName) => parseName(this._product, fileName)) - .filter((entry) => entry && entry.platform === this._platform) - .map((entry) => entry!.revision); - } - - /** - * @remarks - * This method is affected by the current `product`. - * @param revision - A revision to remove for the current `product`. - * @returns A promise that resolves when the revision has been removes or - * throws if the revision has not been downloaded. - */ - async remove(revision: string): Promise { - const folderPath = this._getFolderPath(revision); - assert( - await exists(folderPath), - `Failed to remove: revision ${revision} is not downloaded` - ); - await Deno.remove(folderPath, { recursive: true }); - } - - /** - * @param revision - The revision to get info for. - * @returns The revision info for the given revision. - */ - revisionInfo(revision: string): BrowserFetcherRevisionInfo { - const folderPath = this._getFolderPath(revision); - let executablePath = ""; - if (this._product === "chrome") { - if (this._platform === "mac") { - executablePath = pathJoin( - folderPath, - archiveName(this._product, this._platform, revision), - "Chromium.app", - "Contents", - "MacOS", - "Chromium" - ); - } else if (this._platform === "linux") { - executablePath = pathJoin( - folderPath, - archiveName(this._product, this._platform, revision), - "chrome" - ); - } else if (this._platform === "win32" || this._platform === "win64") { - executablePath = pathJoin( - folderPath, - archiveName(this._product, this._platform, revision), - "chrome.exe" - ); - } else throw new Error("Unsupported platform: " + this._platform); - } else if (this._product === "firefox") { - if (this._platform === "mac") { - executablePath = pathJoin( - folderPath, - "Firefox Nightly.app", - "Contents", - "MacOS", - "firefox" - ); - } else if (this._platform === "linux") { - executablePath = pathJoin(folderPath, "firefox", "firefox"); - } else if (this._platform === "win32" || this._platform === "win64") { - executablePath = pathJoin(folderPath, "firefox", "firefox.exe"); - } else throw new Error("Unsupported platform: " + this._platform); - } else { - throw new Error("Unsupported product: " + this._product); - } - const url = downloadURL( - this._product, - this._platform, - this._downloadHost, - revision - ); - const local = existsSync(folderPath); - debugFetcher({ - revision, - executablePath, - folderPath, - local, - url, - product: this._product, - }); - return { - revision, - executablePath, - folderPath, - local, - url, - product: this._product, - }; - } - - /** - * @internal - */ - _getFolderPath(revision: string): string { - return pathJoin(this._downloadsFolder, this._platform + "-" + revision); - } -} - -function parseName( - product: Product, - name: string -): { product: string; platform: string; revision: string } | null { - const splits = name.split("-"); - if (splits.length !== 2) return null; - const [platform, revision] = splits; - if (!downloadURLs[product]?.[platform as "linux"]) return null; - return { product, platform, revision }; -} - -/** - * @internal - */ -async function downloadFile( - url: string, - destinationPath: string, - progressCallback: (x: number, y: number) => void -): Promise { - debugFetcher(`Downloading binary from ${url}`); - - const response = await fetch(url, { method: "GET" }); - - if (response.status !== 200) { - const error = new Error( - `Download failed: server returned code ${response.status}. URL: ${url}` - ); - - // consume response data to free up memory - await response.arrayBuffer(); - throw error; - } - - const totalBytes = parseInt(response.headers.get("content-length") ?? "", 10); - let downloadedBytes = 0; - - const file = await Deno.create(destinationPath); - - // @ts-ignore because in lib.dom ReadableStream is not an async iterator yet - for await (const chunk of response.body!) { - downloadedBytes += chunk.length; - progressCallback?.(downloadedBytes, totalBytes); - await Deno.writeAll(file, chunk); - } -} - -function install(archivePath: string, folderPath: string): Promise { - debugFetcher(`Installing ${archivePath} to ${folderPath}`); - if (archivePath.endsWith(".zip")) return extractZip(archivePath, folderPath); - else if (archivePath.endsWith(".tar.bz2")) { - return extractTar(archivePath, folderPath); - } else if (archivePath.endsWith(".dmg")) { - return Deno.mkdir(folderPath, { recursive: true }).then(() => - installDMG(archivePath, folderPath) - ); - } else throw new Error(`Unsupported archive format: ${archivePath}`); -} - -async function extractZip(zipPath: string, folderPath: string): Promise { - const z = await readZip(zipPath); - await z.unzip(folderPath); -} - -/** - * @internal - */ -async function extractTar(tarPath: string, folderPath: string): Promise { - console.log(folderPath); - await Deno.mkdir(folderPath, { recursive: true }); - - const bzcat = Deno.run({ - cmd: ["bzcat", tarPath], - stdout: "piped", - }); - const tmp = await Deno.makeTempFile(); - const file = await Deno.create(tmp); - await Deno.copy(bzcat.stdout, file); - assert((await bzcat.status()).success, "failed bzcat"); - bzcat.close(); - - const untar = Deno.run({ - cmd: ["tar", "-C", folderPath, "-xvf", tmp], - }); - assert((await untar.status()).success, "failed untar"); - untar.close(); -} - -/** - * @internal - */ -async function installDMG(dmgPath: string, folderPath: string): Promise { - let mountPath; - try { - const proc = Deno.run({ - cmd: ["hdiutil", "attach", "-nobrowse", "-noautoopen", dmgPath], - }); - const stdout = new TextDecoder().decode(await proc.output()); - proc.close(); - const volumes = stdout.match(/\/Volumes\/(.*)/m); - if (!volumes) throw new Error(`Could not find volume path in ${stdout}`); - mountPath = volumes[0]; - - let appName = undefined; - for await (const file of Deno.readDir(mountPath)) { - if (file.name.endsWith(".app")) { - appName = file.name; - break; - } - } - if (!appName) throw new Error(`Cannot find app in ${mountPath}`); - copyDir(pathJoin(mountPath, appName), folderPath); - } finally { - if (mountPath) { - const proc = Deno.run({ - cmd: ["hdiutil", "detach", mountPath, "-quiet"], - }); - debugFetcher(`Unmounting ${mountPath}`); - const status = await proc.status(); - proc.close(); - assert(status.success, "unmounting failed"); - } - } -} - -/** - * @internal - */ -async function macOSMakeChromiumHelpersExecutable(executablePath: string) { - const helperApps = [ - "Chromium Helper", - "Chromium Helper (GPU)", - "Chromium Helper (Plugin)", - "Chromium Helper (Renderer)", - ]; - - const frameworkPath = pathResolve( - executablePath, - pathJoin("..", "..", "Frameworks", "Chromium Framework.framework", "Versions"), - ); - const versionPath = pathJoin(frameworkPath, "Current"); - - try { - const version = await Deno.readTextFile(versionPath); - - for (const helperApp of helperApps) { - const helperAppPath = pathJoin( - frameworkPath, - version, - "Helpers", - helperApp + ".app", - "Contents", - "MacOS", - helperApp, - ); - await Deno.chmod(helperAppPath, 0o755); - } - } catch (err) { - console.error('Failed to make Chromium Helpers executable', String(err)); - } -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/BrowserRunner.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/BrowserRunner.ts deleted file mode 100644 index d1b493b7fd3..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/BrowserRunner.ts +++ /dev/null @@ -1,183 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { debug } from "../../vendor/puppeteer-core/puppeteer/common/Debug.js"; -import { assert } from "../../vendor/puppeteer-core/puppeteer/common/assert.js"; -import { - debugError, - helper, -} from "../../vendor/puppeteer-core/puppeteer/common/helper.js"; -import { LaunchOptions } from "./LaunchOptions.ts"; -import { Connection } from "../../vendor/puppeteer-core/puppeteer/common/Connection.js"; -import { BrowserWebSocketTransport } from "../../vendor/puppeteer-core/puppeteer/common/BrowserWebSocketTransport.js"; -import { TimeoutError } from "../../vendor/puppeteer-core/puppeteer/common/Errors.js"; -import { readLines } from "../../vendor/puppeteer-core/vendor/std.ts"; - -const debugLauncher = debug("puppeteer:launcher"); -const PROCESS_ERROR_EXPLANATION = `Puppeteer was unable to kill the process which ran the browser binary. -This means that, on future Puppeteer launches, Puppeteer might not be able to launch the browser. -Please check your open processes and ensure that the browser processes that Puppeteer launched have been killed. -If you think this is a bug, please report it on the Puppeteer issue tracker.`; - -export class BrowserRunner { - private _executablePath: string; - private _processArguments: string[]; - private _tempDirectory?: string; - - proc: Deno.Process | undefined = undefined; - connection: Connection | undefined = undefined; - - private _closed = true; - private _listeners = []; - private _processClosing!: Promise; - - constructor( - executablePath: string, - processArguments: string[], - tempDirectory?: string - ) { - this._executablePath = executablePath; - this._processArguments = processArguments; - this._tempDirectory = tempDirectory; - } - - start(options: LaunchOptions): void { - const { env, dumpio } = options; - assert(!this.proc, "This process has previously been started."); - debugLauncher( - `Calling ${this._executablePath} ${this._processArguments.join(" ")}` - ); - this.proc = Deno.run({ - cmd: [this._executablePath, ...this._processArguments], - env, - stdin: "piped", - stdout: "piped", - stderr: "piped", - }); - this._closed = false; - this._processClosing = this.proc.status().then(async (status) => { - this._closed = true; - try { - if (this.proc) { - if (!status.success && dumpio) { - await Deno.copy(this.proc.stdout!, Deno.stdout); - await Deno.copy(this.proc.stderr!, Deno.stderr); - } - this.proc.stdin!.close(); - this.proc.stdout!.close(); - this.proc.stderr!.close(); - this.proc.close(); - } - } catch (err) { - if (!(err instanceof Deno.errors.BadResource)) { - throw err; - } - } - if (this._tempDirectory) { - await Deno.remove(this._tempDirectory, { - recursive: true, - }).catch((error) => {}); - } - }); - } - - close(): Promise { - if (this._closed) return Promise.resolve(); - if (this._tempDirectory) { - this.kill(); - } else if (this.connection) { - // Attempt to close the browser gracefully - this.connection.send("Browser.close").catch((error) => { - debugError(error); - this.kill(); - }); - } - // Cleanup this listener last, as that makes sure the full callback runs. If we - // perform this earlier, then the previous function calls would not happen. - helper.removeEventListeners(this._listeners); - return this._processClosing; - } - - kill(): void { - // Attempt to remove temporary profile directory to avoid littering. - try { - if (this._tempDirectory) { - Deno.removeSync(this._tempDirectory, { recursive: true }); - } - } catch (error) {} - - // If the process failed to launch (for example if the browser executable path - // is invalid), then the process does not get a pid assigned. A call to - // `proc.kill` would error, as the `pid` to-be-killed can not be found. - if (this.proc && this.proc.pid && !this._closed) { - try { - this.proc.kill("SIGKILL"); - } catch (error) { - throw new Error( - `${PROCESS_ERROR_EXPLANATION}\nError cause: ${error.stack}` - ); - } - } - // Cleanup this listener last, as that makes sure the full callback runs. If we - // perform this earlier, then the previous function calls would not happen. - helper.removeEventListeners(this._listeners); - } - - async setupConnection(options: { - timeout: number; - slowMo: number; - preferredRevision: string; - }): Promise { - const { timeout, slowMo, preferredRevision } = options; - const browserWSEndpoint = await waitForWSEndpoint( - this.proc!, - timeout, - preferredRevision - ); - const transport = await BrowserWebSocketTransport.create(browserWSEndpoint); - this.connection = new Connection(browserWSEndpoint, transport, slowMo); - return this.connection; - } -} - -async function waitForWSEndpoint( - browserProcess: Deno.Process, - timeout: number, - preferredRevision: string -): Promise { - const timeId = setTimeout(() => { - throw new TimeoutError( - `Timed out after ${timeout} ms while trying to connect to the browser! Only Chrome at revision r${preferredRevision} is guaranteed to work.` - ); - }, timeout); - - for await (const line of readLines(browserProcess.stderr!)) { - const match = line.match(/^DevTools listening on (ws:\/\/.*)$/); - if (match) { - clearTimeout(timeId); - return match[1]; - } - } - - clearTimeout(timeId); - throw new Error( - [ - "Failed to launch the browser process!" + "", - "TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md", - "", - ].join("\n") - ); -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/LaunchOptions.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/LaunchOptions.ts deleted file mode 100644 index 3b790ecf537..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/LaunchOptions.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Launcher options that only apply to Chrome. - * - * @public - */ -export interface ChromeArgOptions { - headless?: boolean; - args?: string[]; - userDataDir?: string; - devtools?: boolean; -} - -/** - * Generic launch options that can be passed when launching any browser. - * @public - */ -export interface LaunchOptions { - executablePath?: string; - ignoreDefaultArgs?: boolean | string[]; - timeout?: number; - env?: Record; - dumpio?: boolean; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/Launcher.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/Launcher.ts deleted file mode 100644 index 0d558a6c2c4..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/Launcher.ts +++ /dev/null @@ -1,627 +0,0 @@ -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Browser } from "../../vendor/puppeteer-core/puppeteer/common/Browser.js"; -import { BrowserRunner } from "./BrowserRunner.ts"; -import { ChromeArgOptions, LaunchOptions } from "./LaunchOptions.ts"; -import { BrowserConnectOptions } from "../../vendor/puppeteer-core/puppeteer/common/BrowserConnector.js"; -import { Product } from "../../vendor/puppeteer-core/puppeteer/common/Product.js"; -import { - existsSync, - pathJoin, - pathResolve, -} from "../../vendor/puppeteer-core/vendor/std.ts"; -import { BrowserFetcher } from "./BrowserFetcher.ts"; - -/** - * Describes a launcher - a class that is able to create and launch a browser instance. - * @public - */ -export interface ProductLauncher { - launch(object: LaunchOptions & BrowserConnectOptions): Promise; - executablePath: () => string; - defaultArgs(object: {}): string[]; - product: Product; -} - -/** - * @internal - */ -class ChromeLauncher implements ProductLauncher { - _preferredRevision: string; - - constructor(preferredRevision: string) { - this._preferredRevision = preferredRevision; - } - - async launch( - options: LaunchOptions & ChromeArgOptions & BrowserConnectOptions = {}, - ): Promise { - const { - ignoreDefaultArgs = false, - args = [], - executablePath = null, - env = Deno.env.toObject(), - ignoreHTTPSErrors = false, - defaultViewport = { width: 800, height: 600 }, - slowMo = 0, - timeout = 30000, - dumpio = false, - } = options; - - const profilePath = pathJoin( - await Deno.makeTempDir(), - "puppeteer_dev_chrome_profile-", - ); - await Deno.mkdir(profilePath, { recursive: true }); - const chromeArguments = []; - if (!ignoreDefaultArgs) chromeArguments.push(...this.defaultArgs(options)); - else if (Array.isArray(ignoreDefaultArgs)) { - chromeArguments.push( - ...this.defaultArgs(options).filter( - (arg) => !ignoreDefaultArgs.includes(arg), - ), - ); - } else chromeArguments.push(...args); - - let temporaryUserDataDir = undefined; - - if ( - !chromeArguments.some((argument) => - argument.startsWith("--remote-debugging-") - ) - ) { - chromeArguments.push("--remote-debugging-port=0"); - } - if (!chromeArguments.some((arg) => arg.startsWith("--user-data-dir"))) { - temporaryUserDataDir = await Deno.makeTempDir({ dir: profilePath }); - chromeArguments.push(`--user-data-dir=${temporaryUserDataDir}`); - } - - let chromeExecutable = executablePath; - if ((Deno.build.arch as string) === "arm64") { - chromeExecutable = "/usr/bin/chromium-browser"; - } else if (!executablePath) { - const { missingText, executablePath } = await resolveExecutablePath(this); - if (missingText) throw new Error(missingText); - chromeExecutable = executablePath; - } - - const runner = new BrowserRunner( - chromeExecutable!, - chromeArguments, - temporaryUserDataDir, - ); - runner.start({ - env, - dumpio, - }); - - try { - const connection = await runner.setupConnection({ - timeout, - slowMo, - preferredRevision: this._preferredRevision, - }); - const browser = await Browser.create( - connection, - [], - ignoreHTTPSErrors, - defaultViewport, - runner.proc, - runner.close.bind(runner), - ); - await browser.waitForTarget((t) => t.type() === "page"); - return browser; - } catch (error) { - runner.kill(); - throw error; - } - } - - /** - * @param {!Launcher.ChromeArgOptions=} options - * @returns {!Array} - */ - defaultArgs(options: ChromeArgOptions = {}): string[] { - const chromeArguments = [ - "--disable-background-networking", - "--enable-features=NetworkService,NetworkServiceInProcess", - "--disable-background-timer-throttling", - "--disable-backgrounding-occluded-windows", - "--disable-breakpad", - "--disable-client-side-phishing-detection", - "--disable-component-extensions-with-background-pages", - "--disable-default-apps", - "--disable-dev-shm-usage", - "--disable-extensions", - "--disable-features=Translate", - "--disable-hang-monitor", - "--disable-ipc-flooding-protection", - "--disable-popup-blocking", - "--disable-prompt-on-repost", - "--disable-renderer-backgrounding", - "--disable-sync", - "--force-color-profile=srgb", - "--metrics-recording-only", - "--no-first-run", - "--enable-automation", - "--password-store=basic", - "--use-mock-keychain", - // TODO(sadym): remove '--enable-blink-features=IdleDetection' - // once IdleDetection is turned on by default. - "--enable-blink-features=IdleDetection", - ]; - const { - devtools = false, - headless = !devtools, - args = [], - userDataDir = null, - } = options; - if (userDataDir) { - chromeArguments.push(`--user-data-dir=${pathResolve(userDataDir)}`); - } - if (devtools) chromeArguments.push("--auto-open-devtools-for-tabs"); - if (headless) { - chromeArguments.push("--headless", "--hide-scrollbars", "--mute-audio"); - } - if (args.every((arg) => arg.startsWith("-"))) { - chromeArguments.push("about:blank"); - } - chromeArguments.push(...args); - return chromeArguments; - } - - executablePath(): string { - return resolveExecutablePath(this).executablePath; - } - - get product(): Product { - return "chrome"; - } -} - -/** - * @internal - */ -class FirefoxLauncher implements ProductLauncher { - _preferredRevision: string; - - constructor(preferredRevision: string) { - this._preferredRevision = preferredRevision; - } - - async launch( - options: - & LaunchOptions - & ChromeArgOptions - & BrowserConnectOptions - & { - extraPrefsFirefox?: { [x: string]: unknown }; - } = {}, - ): Promise { - const { - ignoreDefaultArgs = false, - args = [], - executablePath = null, - env = Deno.env.toObject(), - ignoreHTTPSErrors = false, - defaultViewport = { width: 800, height: 600 }, - slowMo = 0, - timeout = 30000, - extraPrefsFirefox = {}, - } = options; - - const firefoxArguments = []; - if (!ignoreDefaultArgs) firefoxArguments.push(...this.defaultArgs(options)); - else if (Array.isArray(ignoreDefaultArgs)) { - firefoxArguments.push( - ...this.defaultArgs(options).filter( - (arg) => !ignoreDefaultArgs.includes(arg), - ), - ); - } else firefoxArguments.push(...args); - - if ( - !firefoxArguments.some((argument) => - argument.startsWith("--remote-debugging-") - ) - ) { - firefoxArguments.push("--remote-debugging-port=0"); - } - - let temporaryUserDataDir = undefined; - - if ( - !firefoxArguments.includes("-profile") && - !firefoxArguments.includes("--profile") - ) { - temporaryUserDataDir = await this._createProfile(extraPrefsFirefox); - firefoxArguments.push("--profile"); - firefoxArguments.push(temporaryUserDataDir); - } - - await this._updateRevision(); - let firefoxExecutable = executablePath; - if (!executablePath) { - const { missingText, executablePath } = resolveExecutablePath(this); - if (missingText) throw new Error(missingText); - firefoxExecutable = executablePath; - } - - const runner = new BrowserRunner( - firefoxExecutable!, - firefoxArguments, - temporaryUserDataDir, - ); - runner.start({ - env, - }); - - try { - const connection = await runner.setupConnection({ - timeout, - slowMo, - preferredRevision: this._preferredRevision, - }); - const browser = await Browser.create( - connection, - [], - ignoreHTTPSErrors, - defaultViewport, - runner.proc, - runner.close.bind(runner), - ); - await browser.waitForTarget((t) => t.type() === "page"); - return browser; - } catch (error) { - runner.kill(); - throw error; - } - } - - executablePath(): string { - return resolveExecutablePath(this).executablePath; - } - - async _updateRevision(): Promise { - // replace 'latest' placeholder with actual downloaded revision - if (this._preferredRevision === "latest") { - const browserFetcher = new BrowserFetcher({ - product: this.product, - }); - const localRevisions = await browserFetcher.localRevisions(); - if (localRevisions[0]) this._preferredRevision = localRevisions[0]; - } - } - - get product(): Product { - return "firefox"; - } - - defaultArgs(options: ChromeArgOptions = {}): string[] { - const firefoxArguments = ["--no-remote", "--foreground"]; - if (Deno.build.os == "windows") { - firefoxArguments.push("--wait-for-browser"); - } - const { - devtools = false, - headless = !devtools, - args = [], - userDataDir = null, - } = options; - if (userDataDir) { - firefoxArguments.push("--profile"); - firefoxArguments.push(userDataDir); - } - if (headless) firefoxArguments.push("--headless"); - if (devtools) firefoxArguments.push("--devtools"); - if (args.every((arg) => arg.startsWith("-"))) { - firefoxArguments.push("about:blank"); - } - firefoxArguments.push(...args); - return firefoxArguments; - } - - async _createProfile(extraPrefs: { [x: string]: unknown }): Promise { - const profilePath = pathJoin( - await Deno.makeTempDir(), - "puppeteer_dev_firefox_profile-", - ); - await Deno.mkdir(profilePath, { recursive: true }); - const prefsJS: string[] = []; - const userJS = []; - const server = "dummy.test"; - const defaultPreferences = { - // Make sure Shield doesn't hit the network. - "app.normandy.api_url": "", - // Disable Firefox old build background check - "app.update.checkInstallTime": false, - // Disable automatically upgrading Firefox - "app.update.disabledForTesting": true, - - // Increase the APZ content response timeout to 1 minute - "apz.content_response_timeout": 60000, - - // Prevent various error message on the console - // jest-puppeteer asserts that no error message is emitted by the console - "browser.contentblocking.features.standard": - "-tp,tpPrivate,cookieBehavior0,-cm,-fp", - - // Enable the dump function: which sends messages to the system - // console - // https://bugzilla.mozilla.org/show_bug.cgi?id=1543115 - "browser.dom.window.dump.enabled": true, - // Disable topstories - "browser.newtabpage.activity-stream.feeds.system.topstories": false, - // Always display a blank page - "browser.newtabpage.enabled": false, - // Background thumbnails in particular cause grief: and disabling - // thumbnails in general cannot hurt - "browser.pagethumbnails.capturing_disabled": true, - - // Disable safebrowsing components. - "browser.safebrowsing.blockedURIs.enabled": false, - "browser.safebrowsing.downloads.enabled": false, - "browser.safebrowsing.malware.enabled": false, - "browser.safebrowsing.passwords.enabled": false, - "browser.safebrowsing.phishing.enabled": false, - - // Disable updates to search engines. - "browser.search.update": false, - // Do not restore the last open set of tabs if the browser has crashed - "browser.sessionstore.resume_from_crash": false, - // Skip check for default browser on startup - "browser.shell.checkDefaultBrowser": false, - - // Disable newtabpage - "browser.startup.homepage": "about:blank", - // Do not redirect user when a milstone upgrade of Firefox is detected - "browser.startup.homepage_override.mstone": "ignore", - // Start with a blank page about:blank - "browser.startup.page": 0, - - // Do not allow background tabs to be zombified on Android: otherwise for - // tests that open additional tabs: the test harness tab itself might get - // unloaded - "browser.tabs.disableBackgroundZombification": false, - // Do not warn when closing all other open tabs - "browser.tabs.warnOnCloseOtherTabs": false, - // Do not warn when multiple tabs will be opened - "browser.tabs.warnOnOpen": false, - - // Disable the UI tour. - "browser.uitour.enabled": false, - // Turn off search suggestions in the location bar so as not to trigger - // network connections. - "browser.urlbar.suggest.searches": false, - // Disable first run splash page on Windows 10 - "browser.usedOnWindows10.introURL": "", - // Do not warn on quitting Firefox - "browser.warnOnQuit": false, - - // Defensively disable data reporting systems - "datareporting.healthreport.documentServerURI": - `http://${server}/dummy/healthreport/`, - "datareporting.healthreport.logging.consoleEnabled": false, - "datareporting.healthreport.service.enabled": false, - "datareporting.healthreport.service.firstRun": false, - "datareporting.healthreport.uploadEnabled": false, - - // Do not show datareporting policy notifications which can interfere with tests - "datareporting.policy.dataSubmissionEnabled": false, - "datareporting.policy.dataSubmissionPolicyBypassNotification": true, - - // DevTools JSONViewer sometimes fails to load dependencies with its require.js. - // This doesn't affect Puppeteer but spams console (Bug 1424372) - "devtools.jsonview.enabled": false, - - // Disable popup-blocker - "dom.disable_open_during_load": false, - - // Enable the support for File object creation in the content process - // Required for |Page.setFileInputFiles| protocol method. - "dom.file.createInChild": true, - - // Disable the ProcessHangMonitor - "dom.ipc.reportProcessHangs": false, - - // Disable slow script dialogues - "dom.max_chrome_script_run_time": 0, - "dom.max_script_run_time": 0, - - // Only load extensions from the application and user profile - // AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_APPLICATION - "extensions.autoDisableScopes": 0, - "extensions.enabledScopes": 5, - - // Disable metadata caching for installed add-ons by default - "extensions.getAddons.cache.enabled": false, - - // Disable installing any distribution extensions or add-ons. - "extensions.installDistroAddons": false, - - // Disabled screenshots extension - "extensions.screenshots.disabled": true, - - // Turn off extension updates so they do not bother tests - "extensions.update.enabled": false, - - // Turn off extension updates so they do not bother tests - "extensions.update.notifyUser": false, - - // Make sure opening about:addons will not hit the network - "extensions.webservice.discoverURL": - `http://${server}/dummy/discoveryURL`, - - // Force disable Fission until the Remote Agent is compatible - "fission.autostart": false, - - // Allow the application to have focus even it runs in the background - "focusmanager.testmode": true, - // Disable useragent updates - "general.useragent.updates.enabled": false, - // Always use network provider for geolocation tests so we bypass the - // macOS dialog raised by the corelocation provider - "geo.provider.testing": true, - // Do not scan Wifi - "geo.wifi.scan": false, - // No hang monitor - "hangmonitor.timeout": 0, - // Show chrome errors and warnings in the error console - "javascript.options.showInConsole": true, - - // Disable download and usage of OpenH264: and Widevine plugins - "media.gmp-manager.updateEnabled": false, - // Prevent various error message on the console - // jest-puppeteer asserts that no error message is emitted by the console - "network.cookie.cookieBehavior": 0, - - // Do not prompt for temporary redirects - "network.http.prompt-temp-redirect": false, - - // Disable speculative connections so they are not reported as leaking - // when they are hanging around - "network.http.speculative-parallel-limit": 0, - - // Do not automatically switch between offline and online - "network.manage-offline-status": false, - - // Make sure SNTP requests do not hit the network - "network.sntp.pools": server, - - // Disable Flash. - "plugin.state.flash": 0, - - "privacy.trackingprotection.enabled": false, - - // Enable Remote Agent - // https://bugzilla.mozilla.org/show_bug.cgi?id=1544393 - "remote.enabled": true, - - // Don't do network connections for mitm priming - "security.certerrors.mitm.priming.enabled": false, - // Local documents have access to all other local documents, - // including directory listings - "security.fileuri.strict_origin_policy": false, - // Do not wait for the notification button security delay - "security.notification_enable_delay": 0, - - // Ensure blocklist updates do not hit the network - "services.settings.server": `http://${server}/dummy/blocklist/`, - - // Do not automatically fill sign-in forms with known usernames and - // passwords - "signon.autofillForms": false, - // Disable password capture, so that tests that include forms are not - // influenced by the presence of the persistent doorhanger notification - "signon.rememberSignons": false, - - // Disable first-run welcome page - "startup.homepage_welcome_url": "about:blank", - - // Disable first-run welcome page - "startup.homepage_welcome_url.additional": "", - - // Disable browser animations (tabs, fullscreen, sliding alerts) - "toolkit.cosmeticAnimations.enabled": false, - - // Prevent starting into safe mode after application crashes - "toolkit.startup.max_resumed_crashes": -1, - }; - - Object.assign(defaultPreferences, extraPrefs); - for (const [key, value] of Object.entries(defaultPreferences)) { - userJS.push( - `user_pref(${JSON.stringify(key)}, ${JSON.stringify(value)});`, - ); - } - await Deno.writeTextFile( - pathJoin(profilePath, "user.js"), - userJS.join("\n"), - ); - await Deno.writeTextFile( - pathJoin(profilePath, "prefs.js"), - prefsJS.join("\n"), - ); - return profilePath; - } -} - -function resolveExecutablePath( - launcher: ChromeLauncher | FirefoxLauncher, -): { executablePath: string; missingText?: string } { - const executablePath = Deno.env.get("PUPPETEER_EXECUTABLE_PATH"); - if (executablePath) { - const missingText = !existsSync(executablePath) - ? "Tried to use PUPPETEER_EXECUTABLE_PATH env variable to launch browser but did not find any executable at: " + - executablePath - : undefined; - return { executablePath, missingText }; - } - const downloadPath = Deno.env.get("PUPPETEER_DOWNLOAD_PATH"); - const browserFetcher = new BrowserFetcher({ - product: launcher.product, - path: downloadPath, - }); - if (launcher.product === "chrome") { - const revision = Deno.env.get("PUPPETEER_CHROMIUM_REVISION"); - if (revision) { - const revisionInfo = browserFetcher.revisionInfo(revision); - const missingText = !revisionInfo.local - ? "Tried to use PUPPETEER_CHROMIUM_REVISION env variable to launch browser but did not find executable at: " + - revisionInfo.executablePath - : undefined; - return { executablePath: revisionInfo.executablePath, missingText }; - } - } - - const revisionInfo = browserFetcher.revisionInfo(launcher._preferredRevision); - const missingText = !revisionInfo.local - ? `Could not find browser revision ${launcher._preferredRevision}. Run "PUPPETEER_PRODUCT=${launcher.product} deno run -A --unstable-ffi ${new URL( - "../../vendor/puppeteer-core/puppeteer/../../../install.ts", - import.meta.url, - )}" to download a supported browser binary.` - : undefined; - return { executablePath: revisionInfo.executablePath, missingText }; -} - -/** - * @internal - */ -export default function Launcher( - preferredRevision: string, - product?: string, -): ProductLauncher { - // puppeteer-core doesn't take into account PUPPETEER_* env variables. - if (!product) product = Deno.env.get("PUPPETEER_PRODUCT"); - switch (product) { - case "firefox": - return new FirefoxLauncher(preferredRevision); - case "chrome": - default: - if (typeof product !== "undefined" && product !== "chrome") { - /* The user gave us an incorrect product name - * we'll default to launching Chrome, but log to the console - * to let the user know (they've probably typoed). - */ - console.warn( - `Warning: unknown product name ${product}. Falling back to chrome.`, - ); - } - return new ChromeLauncher(preferredRevision); - } -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/Puppeteer.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/Puppeteer.ts deleted file mode 100644 index 5b6ca21b9eb..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/deno/Puppeteer.ts +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { - ConnectOptions, - Puppeteer, -} from "../../vendor/puppeteer-core/puppeteer/common/Puppeteer.js"; -import { BrowserFetcher, BrowserFetcherOptions } from "./BrowserFetcher.ts"; -import { ChromeArgOptions, LaunchOptions } from "./LaunchOptions.ts"; -import { BrowserConnectOptions } from "../../vendor/puppeteer-core/puppeteer/common/BrowserConnector.js"; -import { Browser } from "../../vendor/puppeteer-core/puppeteer/common/Browser.js"; -import Launcher, { ProductLauncher } from "./Launcher.ts"; -import { PUPPETEER_REVISIONS } from "../../vendor/puppeteer-core/puppeteer/revisions.js"; -import { Product } from "../../vendor/puppeteer-core/puppeteer/common/Product.js"; - -/** - * Extends the main {@link Puppeteer} class with Node specific behaviour for fetching and - * downloading browsers. - * - * If you're using Puppeteer in a Node environment, this is the class you'll get - * when you run `require('puppeteer')` (or the equivalent ES `import`). - * - * @remarks - * - * The most common method to use is {@link PuppeteerDeno.launch | launch}, which - * is used to launch and connect to a new browser instance. - * - * See {@link Puppeteer | the main Puppeteer class} for methods common to all - * environments, such as {@link Puppeteer.connect}. - * - * @example - * The following is a typical example of using Puppeteer to drive automation: - * ```js - * const puppeteer = require('puppeteer'); - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.goto('https://www.google.com'); - * // other actions... - * await browser.close(); - * })(); - * ``` - * - * Once you have created a `page` you have access to a large API to interact - * with the page, navigate, or find certain elements in that page. - * The {@link Page | `page` documentation} lists all the available methods. - * - * @public - */ -export class PuppeteerDeno extends Puppeteer { - private _lazyLauncher!: ProductLauncher; - private __productName?: Product; - /** - * @internal - */ - _preferredRevision: string; - - /** - * @internal - */ - constructor(settings: { preferredRevision: string; productName?: Product }) { - const { preferredRevision, productName } = settings; - super(); - this.__productName = productName; - this._preferredRevision = preferredRevision; - } - - /** - * This method attaches Puppeteer to an existing browser instance. - * - * @remarks - * - * @param options - Set of configurable options to set on the browser. - * @returns Promise which resolves to browser instance. - */ - connect(options: ConnectOptions): Promise { - if (options.product) this._productName = options.product; - return super.connect(options); - } - - /** - * @internal - */ - get _productName(): Product { - return this.__productName!; - } - - // don't need any TSDoc here - because the getter is internal the setter is too. - set _productName(name: Product) { - if (this.__productName !== name) this._changedProduct = true; - this.__productName = name; - } - - /** - * Launches puppeteer and launches a browser instance with given arguments - * and options when specified. - * - * @remarks - * - * @example - * You can use `ignoreDefaultArgs` to filter out `--mute-audio` from default arguments: - * ```js - * const browser = await puppeteer.launch({ - * ignoreDefaultArgs: ['--mute-audio'] - * }); - * ``` - * - * **NOTE** Puppeteer can also be used to control the Chrome browser, - * but it works best with the version of Chromium it is bundled with. - * There is no guarantee it will work with any other version. - * Use `executablePath` option with extreme caution. - * If Google Chrome (rather than Chromium) is preferred, a {@link https://www.google.com/chrome/browser/canary.html | Chrome Canary} or {@link https://www.chromium.org/getting-involved/dev-channel | Dev Channel} build is suggested. - * In `puppeteer.launch([options])`, any mention of Chromium also applies to Chrome. - * See {@link https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/ | this article} for a description of the differences between Chromium and Chrome. {@link https://chromium.googlesource.com/chromium/src/+/lkgr/docs/chromium_browser_vs_google_chrome.md | This article} describes some differences for Linux users. - * - * @param options - Set of configurable options to set on the browser. - * @returns Promise which resolves to browser instance. - */ - launch( - options: LaunchOptions & - ChromeArgOptions & - BrowserConnectOptions & { - product?: Product; - extraPrefsFirefox?: Record; - } = {} - ): Promise { - if (options.product) this._productName = options.product; - return this._launcher.launch(options); - } - - /** - * @remarks - * - * **NOTE** `puppeteer.executablePath()` is affected by the `PUPPETEER_EXECUTABLE_PATH` - * and `PUPPETEER_CHROMIUM_REVISION` environment variables. - * - * @returns A path where Puppeteer expects to find the bundled browser. - * The browser binary might not be there if the download was skipped with - * the `PUPPETEER_SKIP_DOWNLOAD` environment variable. - */ - executablePath(): string { - return this._launcher.executablePath(); - } - - /** - * @internal - */ - get _launcher(): ProductLauncher { - if ( - !this._lazyLauncher || - this._lazyLauncher.product !== this._productName || - this._changedProduct - ) { - switch (this._productName) { - case "firefox": - this._preferredRevision = PUPPETEER_REVISIONS.firefox; - break; - case "chrome": - default: - this._preferredRevision = PUPPETEER_REVISIONS.chromium; - } - this._changedProduct = false; - this._lazyLauncher = Launcher(this._preferredRevision, this._productName); - } - return this._lazyLauncher; - } - - /** - * The name of the browser that is under automation (`"chrome"` or `"firefox"`) - * - * @remarks - * The product is set by the `PUPPETEER_PRODUCT` environment variable or the `product` - * option in `puppeteer.launch([options])` and defaults to `chrome`. - * Firefox support is experimental. - */ - get product(): string { - return this._launcher.product; - } - - /** - * - * @param options - Set of configurable options to set on the browser. - * @returns The default flags that Chromium will be launched with. - */ - defaultArgs(options: ChromeArgOptions = {}): string[] { - return this._launcher.defaultArgs(options); - } - - /** - * @param options - Set of configurable options to specify the settings - * of the BrowserFetcher. - * @returns A new BrowserFetcher instance. - */ - createBrowserFetcher(options: BrowserFetcherOptions): BrowserFetcher { - return new BrowserFetcher(options); - } -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/initialize-deno.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/initialize-deno.ts deleted file mode 100644 index 0b8c5a3fe56..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/initialize-deno.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { PuppeteerDeno } from "./deno/Puppeteer.ts"; -import { PUPPETEER_REVISIONS } from "../vendor/puppeteer-core/puppeteer/revisions.js"; - -export const initializePuppeteerDeno = (): PuppeteerDeno => { - const productName = Deno.env.get("PUPPETEER_PRODUCT") as "chrome" | "firefox"; - - let preferredRevision = PUPPETEER_REVISIONS.chromium; - if (productName == "firefox") preferredRevision = PUPPETEER_REVISIONS.firefox; - - return new PuppeteerDeno({ - preferredRevision, - productName, - }); -}; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/mod.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/mod.ts deleted file mode 100644 index a85f913e996..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/src/mod.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { initializePuppeteerDeno } from "./initialize-deno.ts"; -export default initializePuppeteerDeno(); diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/api-docs-entry.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/api-docs-entry.d.ts deleted file mode 100644 index edb1bdb2c6a..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/api-docs-entry.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { BrowserConnectOptions } from "./common/BrowserConnector.js"; -import { Product } from "./common/Product.js"; -import { Browser } from "./common/Browser.js"; -import { ConnectOptions } from "./common/Puppeteer.js"; -import { DevicesMap } from "./common/DeviceDescriptors.js"; -import { PuppeteerErrors } from "./common/Errors.js"; -import { PredefinedNetworkConditions } from "./common/NetworkConditions.js"; -import { CustomQueryHandler } from "./common/QueryHandler.js"; -import { LaunchOptions } from "../../../src/deno/LaunchOptions.ts"; -export * from "./common/Accessibility.js"; -export * from "./common/Browser.js"; -export * from "./common/Coverage.js"; -export * from "./common/Connection.js"; -export * from "./common/ConsoleMessage.js"; -export * from "./common/Coverage.js"; -export * from "./common/DeviceDescriptors.js"; -export * from "./common/Dialog.js"; -export * from "./common/DOMWorld.js"; -export * from "./common/JSHandle.js"; -export * from "./common/ExecutionContext.js"; -export * from "./common/EventEmitter.js"; -export * from "./common/FileChooser.js"; -export * from "./common/FrameManager.js"; -export * from "./common/PuppeteerViewport.js"; -export * from "./common/Input.js"; -export * from "./common/Page.js"; -export * from "./common/Product.js"; -export * from "./common/Puppeteer.js"; -export * from "./common/BrowserConnector.js"; -export * from "./common/HTTPRequest.js"; -export * from "./common/HTTPResponse.js"; -export * from "./common/SecurityDetails.js"; -export * from "./common/Target.js"; -export * from "./common/Errors.js"; -export * from "./common/Tracing.js"; -export * from "./common/NetworkManager.js"; -export * from "./common/WebWorker.js"; -export * from "./common/USKeyboardLayout.js"; -export * from "./common/EvalTypes.js"; -export * from "./common/PDFOptions.js"; -export * from "./common/TimeoutSettings.js"; -export * from "./common/LifecycleWatcher.js"; -export * from "./common/QueryHandler.js"; -export * from "./common/NetworkConditions.js"; -export * from "../vendor/devtools-protocol/types/protocol.d.ts"; -export * from "../../../src/deno/LaunchOptions.ts"; -/** - * @public - * {@inheritDoc PuppeteerNode.launch} - */ -export declare function launch( - options?: - & LaunchOptions - & BrowserConnectOptions - & { - product?: Product; - extraPrefsFirefox?: Record; - }, -): Promise; -/** - * @public - * {@inheritDoc PuppeteerNode.connect} - */ -export declare function connect(options: ConnectOptions): Promise; -/** - * @public - * {@inheritDoc Puppeteer.devices} - */ -export declare let devices: DevicesMap; -/** - * @public - */ -export declare let errors: PuppeteerErrors; -/** - * @public - */ -export declare let networkConditions: PredefinedNetworkConditions; -/** - * @public - * {@inheritDoc Puppeteer.registerCustomQueryHandler} - */ -export declare function registerCustomQueryHandler( - name: string, - queryHandler: CustomQueryHandler, -): void; -/** - * @public - * {@inheritDoc Puppeteer.unregisterCustomQueryHandler} - */ -export declare function unregisterCustomQueryHandler(name: string): void; -/** - * @public - * {@inheritDoc Puppeteer.customQueryHandlerNames} - */ -export declare function customQueryHandlerNames(): string[]; -/** - * @public - * {@inheritDoc Puppeteer.clearCustomQueryHandlers} - */ -export declare function clearCustomQueryHandlers(): void; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/api-docs-entry.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/api-docs-entry.js deleted file mode 100644 index 96be9a6cb00..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/api-docs-entry.js +++ /dev/null @@ -1,77 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* - * This file re-exports any APIs that we want to have documentation generated - * for. It is used by API Extractor to determine what parts of the system to - * document. - * - * The legacy DocLint system and the unit test coverage system use the list of - * modules defined in coverage-utils.js. src/api-docs-entry.ts is ONLY used by - * API Extractor. - * - * Once we have migrated to API Extractor and removed DocLint we can remove the - * duplication and use this file. - */ -export * from "./common/Accessibility.js"; -export * from "./common/Browser.js"; -export * from "./common/Coverage.js"; -export * from "./common/Connection.js"; -export * from "./common/ConsoleMessage.js"; -export * from "./common/Coverage.js"; -export * from "./common/DeviceDescriptors.js"; -export * from "./common/Dialog.js"; -export * from "./common/DOMWorld.js"; -export * from "./common/JSHandle.js"; -export * from "./common/ExecutionContext.js"; -export * from "./common/EventEmitter.js"; -export * from "./common/FileChooser.js"; -export * from "./common/FrameManager.js"; -export * from "./common/PuppeteerViewport.js"; -export * from "./common/Input.js"; -export * from "./common/Page.js"; -export * from "./common/Product.js"; -export * from "./common/Puppeteer.js"; -export * from "./common/BrowserConnector.js"; -export * from "./common/HTTPRequest.js"; -export * from "./common/HTTPResponse.js"; -export * from "./common/SecurityDetails.js"; -export * from "./common/Target.js"; -export * from "./common/Errors.js"; -export * from "./common/Tracing.js"; -export * from "./common/NetworkManager.js"; -export * from "./common/WebWorker.js"; -export * from "./common/USKeyboardLayout.js"; -export * from "./common/EvalTypes.js"; -export * from "./common/PDFOptions.js"; -export * from "./common/TimeoutSettings.js"; -export * from "./common/LifecycleWatcher.js"; -export * from "./common/QueryHandler.js"; -export * from "./common/NetworkConditions.js"; -/** - * @public - * {@inheritDoc Puppeteer.devices} - */ -export let devices; -/** - * @public - */ -export let errors; -/** - * @public - */ -export let networkConditions; -//# sourceMappingURL=api-docs-entry.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Accessibility.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Accessibility.d.ts deleted file mode 100644 index fdc15a3a715..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Accessibility.d.ts +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Copyright 2018 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { CDPSession } from "./Connection.js"; -import { ElementHandle } from "./JSHandle.js"; -/** - * Represents a Node and the properties of it that are relevant to Accessibility. - * @public - */ -export interface SerializedAXNode { - /** - * The {@link https://www.w3.org/TR/wai-aria/#usage_intro | role} of the node. - */ - role: string; - /** - * A human readable name for the node. - */ - name?: string; - /** - * The current value of the node. - */ - value?: string | number; - /** - * An additional human readable description of the node. - */ - description?: string; - /** - * Any keyboard shortcuts associated with this node. - */ - keyshortcuts?: string; - /** - * A human readable alternative to the role. - */ - roledescription?: string; - /** - * A description of the current value. - */ - valuetext?: string; - disabled?: boolean; - expanded?: boolean; - focused?: boolean; - modal?: boolean; - multiline?: boolean; - /** - * Whether more than one child can be selected. - */ - multiselectable?: boolean; - readonly?: boolean; - required?: boolean; - selected?: boolean; - /** - * Whether the checkbox is checked, or in a - * {@link https://www.w3.org/TR/wai-aria-practices/examples/checkbox/checkbox-2/checkbox-2.html | mixed state}. - */ - checked?: boolean | "mixed"; - /** - * Whether the node is checked or in a mixed state. - */ - pressed?: boolean | "mixed"; - /** - * The level of a heading. - */ - level?: number; - valuemin?: number; - valuemax?: number; - autocomplete?: string; - haspopup?: string; - /** - * Whether and in what way this node's value is invalid. - */ - invalid?: string; - orientation?: string; - /** - * Children of this node, if there are any. - */ - children?: SerializedAXNode[]; -} -/** - * @public - */ -export interface SnapshotOptions { - /** - * Prune uninteresting nodes from the tree. - * @defaultValue true - */ - interestingOnly?: boolean; - /** - * Root node to get the accessibility tree for - * @defaultValue The root node of the entire page. - */ - root?: ElementHandle; -} -/** - * The Accessibility class provides methods for inspecting Chromium's - * accessibility tree. The accessibility tree is used by assistive technology - * such as {@link https://en.wikipedia.org/wiki/Screen_reader | screen readers} or - * {@link https://en.wikipedia.org/wiki/Switch_access | switches}. - * - * @remarks - * - * Accessibility is a very platform-specific thing. On different platforms, - * there are different screen readers that might have wildly different output. - * - * Blink - Chrome's rendering engine - has a concept of "accessibility tree", - * which is then translated into different platform-specific APIs. Accessibility - * namespace gives users access to the Blink Accessibility Tree. - * - * Most of the accessibility tree gets filtered out when converting from Blink - * AX Tree to Platform-specific AX-Tree or by assistive technologies themselves. - * By default, Puppeteer tries to approximate this filtering, exposing only - * the "interesting" nodes of the tree. - * - * @public - */ -export declare class Accessibility { - private _client; - /** - * @internal - */ - constructor(client: CDPSession); - /** - * Captures the current state of the accessibility tree. - * The returned object represents the root accessible node of the page. - * - * @remarks - * - * **NOTE** The Chromium accessibility tree contains nodes that go unused on - * most platforms and by most screen readers. Puppeteer will discard them as - * well for an easier to process tree, unless `interestingOnly` is set to - * `false`. - * - * @example - * An example of dumping the entire accessibility tree: - * ```js - * const snapshot = await page.accessibility.snapshot(); - * console.log(snapshot); - * ``` - * - * @example - * An example of logging the focused node's name: - * ```js - * const snapshot = await page.accessibility.snapshot(); - * const node = findFocusedNode(snapshot); - * console.log(node && node.name); - * - * function findFocusedNode(node) { - * if (node.focused) - * return node; - * for (const child of node.children || []) { - * const foundNode = findFocusedNode(child); - * return foundNode; - * } - * return null; - * } - * ``` - * - * @returns An AXNode object representing the snapshot. - * - */ - snapshot(options?: SnapshotOptions): Promise; - private serializeTree; - private collectInterestingNodes; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Accessibility.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Accessibility.js deleted file mode 100644 index 7518ef38f28..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Accessibility.js +++ /dev/null @@ -1,399 +0,0 @@ -/// -/** - * Copyright 2018 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * The Accessibility class provides methods for inspecting Chromium's - * accessibility tree. The accessibility tree is used by assistive technology - * such as {@link https://en.wikipedia.org/wiki/Screen_reader | screen readers} or - * {@link https://en.wikipedia.org/wiki/Switch_access | switches}. - * - * @remarks - * - * Accessibility is a very platform-specific thing. On different platforms, - * there are different screen readers that might have wildly different output. - * - * Blink - Chrome's rendering engine - has a concept of "accessibility tree", - * which is then translated into different platform-specific APIs. Accessibility - * namespace gives users access to the Blink Accessibility Tree. - * - * Most of the accessibility tree gets filtered out when converting from Blink - * AX Tree to Platform-specific AX-Tree or by assistive technologies themselves. - * By default, Puppeteer tries to approximate this filtering, exposing only - * the "interesting" nodes of the tree. - * - * @public - */ -export class Accessibility { - /** - * @internal - */ - constructor(client) { - this._client = client; - } - /** - * Captures the current state of the accessibility tree. - * The returned object represents the root accessible node of the page. - * - * @remarks - * - * **NOTE** The Chromium accessibility tree contains nodes that go unused on - * most platforms and by most screen readers. Puppeteer will discard them as - * well for an easier to process tree, unless `interestingOnly` is set to - * `false`. - * - * @example - * An example of dumping the entire accessibility tree: - * ```js - * const snapshot = await page.accessibility.snapshot(); - * console.log(snapshot); - * ``` - * - * @example - * An example of logging the focused node's name: - * ```js - * const snapshot = await page.accessibility.snapshot(); - * const node = findFocusedNode(snapshot); - * console.log(node && node.name); - * - * function findFocusedNode(node) { - * if (node.focused) - * return node; - * for (const child of node.children || []) { - * const foundNode = findFocusedNode(child); - * return foundNode; - * } - * return null; - * } - * ``` - * - * @returns An AXNode object representing the snapshot. - * - */ - async snapshot(options = {}) { - const { interestingOnly = true, root = null } = options; - const { nodes } = await this._client.send("Accessibility.getFullAXTree"); - let backendNodeId = null; - if (root) { - const { node } = await this._client.send("DOM.describeNode", { - objectId: root._remoteObject.objectId, - }); - backendNodeId = node.backendNodeId; - } - const defaultRoot = AXNode.createTree(nodes); - let needle = defaultRoot; - if (backendNodeId) { - needle = defaultRoot.find((node) => - node.payload.backendDOMNodeId === backendNodeId - ); - if (!needle) { - return null; - } - } - if (!interestingOnly) { - return this.serializeTree(needle)[0]; - } - const interestingNodes = new Set(); - this.collectInterestingNodes(interestingNodes, defaultRoot, false); - if (!interestingNodes.has(needle)) { - return null; - } - return this.serializeTree(needle, interestingNodes)[0]; - } - serializeTree(node, interestingNodes) { - const children = []; - for (const child of node.children) { - children.push(...this.serializeTree(child, interestingNodes)); - } - if (interestingNodes && !interestingNodes.has(node)) { - return children; - } - const serializedNode = node.serialize(); - if (children.length) { - serializedNode.children = children; - } - return [serializedNode]; - } - collectInterestingNodes(collection, node, insideControl) { - if (node.isInteresting(insideControl)) { - collection.add(node); - } - if (node.isLeafNode()) { - return; - } - insideControl = insideControl || node.isControl(); - for (const child of node.children) { - this.collectInterestingNodes(collection, child, insideControl); - } - } -} -class AXNode { - constructor(payload) { - this.children = []; - this._richlyEditable = false; - this._editable = false; - this._focusable = false; - this._hidden = false; - this.payload = payload; - this._name = this.payload.name ? this.payload.name.value : ""; - this._role = this.payload.role ? this.payload.role.value : "Unknown"; - this._ignored = this.payload.ignored; - for (const property of this.payload.properties || []) { - if (property.name === "editable") { - this._richlyEditable = property.value.value === "richtext"; - this._editable = true; - } - if (property.name === "focusable") { - this._focusable = property.value.value; - } - if (property.name === "hidden") { - this._hidden = property.value.value; - } - } - } - _isPlainTextField() { - if (this._richlyEditable) { - return false; - } - if (this._editable) { - return true; - } - return this._role === "textbox" || this._role === "searchbox"; - } - _isTextOnlyObject() { - const role = this._role; - return role === "LineBreak" || role === "text" || role === "InlineTextBox"; - } - _hasFocusableChild() { - if (this._cachedHasFocusableChild === undefined) { - this._cachedHasFocusableChild = false; - for (const child of this.children) { - if (child._focusable || child._hasFocusableChild()) { - this._cachedHasFocusableChild = true; - break; - } - } - } - return this._cachedHasFocusableChild; - } - find(predicate) { - if (predicate(this)) { - return this; - } - for (const child of this.children) { - const result = child.find(predicate); - if (result) { - return result; - } - } - return null; - } - isLeafNode() { - if (!this.children.length) { - return true; - } - // These types of objects may have children that we use as internal - // implementation details, but we want to expose them as leaves to platform - // accessibility APIs because screen readers might be confused if they find - // any children. - if (this._isPlainTextField() || this._isTextOnlyObject()) { - return true; - } - // Roles whose children are only presentational according to the ARIA and - // HTML5 Specs should be hidden from screen readers. - // (Note that whilst ARIA buttons can have only presentational children, HTML5 - // buttons are allowed to have content.) - switch (this._role) { - case "doc-cover": - case "graphics-symbol": - case "img": - case "Meter": - case "scrollbar": - case "slider": - case "separator": - case "progressbar": - return true; - default: - break; - } - // Here and below: Android heuristics - if (this._hasFocusableChild()) { - return false; - } - if (this._focusable && this._name) { - return true; - } - if (this._role === "heading" && this._name) { - return true; - } - return false; - } - isControl() { - switch (this._role) { - case "button": - case "checkbox": - case "ColorWell": - case "combobox": - case "DisclosureTriangle": - case "listbox": - case "menu": - case "menubar": - case "menuitem": - case "menuitemcheckbox": - case "menuitemradio": - case "radio": - case "scrollbar": - case "searchbox": - case "slider": - case "spinbutton": - case "switch": - case "tab": - case "textbox": - case "tree": - case "treeitem": - return true; - default: - return false; - } - } - isInteresting(insideControl) { - const role = this._role; - if (role === "Ignored" || this._hidden || this._ignored) { - return false; - } - if (this._focusable || this._richlyEditable) { - return true; - } - // If it's not focusable but has a control role, then it's interesting. - if (this.isControl()) { - return true; - } - // A non focusable child of a control is not interesting - if (insideControl) { - return false; - } - return this.isLeafNode() && !!this._name; - } - serialize() { - const properties = new Map(); - for (const property of this.payload.properties || []) { - properties.set(property.name.toLowerCase(), property.value.value); - } - if (this.payload.name) { - properties.set("name", this.payload.name.value); - } - if (this.payload.value) { - properties.set("value", this.payload.value.value); - } - if (this.payload.description) { - properties.set("description", this.payload.description.value); - } - const node = { - role: this._role, - }; - const userStringProperties = [ - "name", - "value", - "description", - "keyshortcuts", - "roledescription", - "valuetext", - ]; - const getUserStringPropertyValue = (key) => properties.get(key); - for (const userStringProperty of userStringProperties) { - if (!properties.has(userStringProperty)) { - continue; - } - node[userStringProperty] = getUserStringPropertyValue(userStringProperty); - } - const booleanProperties = [ - "disabled", - "expanded", - "focused", - "modal", - "multiline", - "multiselectable", - "readonly", - "required", - "selected", - ]; - const getBooleanPropertyValue = (key) => properties.get(key); - for (const booleanProperty of booleanProperties) { - // WebArea's treat focus differently than other nodes. They report whether - // their frame has focus, not whether focus is specifically on the root - // node. - if (booleanProperty === "focused" && this._role === "WebArea") { - continue; - } - const value = getBooleanPropertyValue(booleanProperty); - if (!value) { - continue; - } - node[booleanProperty] = getBooleanPropertyValue(booleanProperty); - } - const tristateProperties = ["checked", "pressed"]; - for (const tristateProperty of tristateProperties) { - if (!properties.has(tristateProperty)) { - continue; - } - const value = properties.get(tristateProperty); - node[tristateProperty] = value === "mixed" - ? "mixed" - : value === "true" - ? true - : false; - } - const numericalProperties = [ - "level", - "valuemax", - "valuemin", - ]; - const getNumericalPropertyValue = (key) => properties.get(key); - for (const numericalProperty of numericalProperties) { - if (!properties.has(numericalProperty)) { - continue; - } - node[numericalProperty] = getNumericalPropertyValue(numericalProperty); - } - const tokenProperties = [ - "autocomplete", - "haspopup", - "invalid", - "orientation", - ]; - const getTokenPropertyValue = (key) => properties.get(key); - for (const tokenProperty of tokenProperties) { - const value = getTokenPropertyValue(tokenProperty); - if (!value || value === "false") { - continue; - } - node[tokenProperty] = getTokenPropertyValue(tokenProperty); - } - return node; - } - static createTree(payloads) { - const nodeById = new Map(); - for (const payload of payloads) { - nodeById.set(payload.nodeId, new AXNode(payload)); - } - for (const node of nodeById.values()) { - for (const childId of node.payload.childIds || []) { - node.children.push(nodeById.get(childId)); - } - } - return nodeById.values().next().value; - } -} -//# sourceMappingURL=Accessibility.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/AriaQueryHandler.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/AriaQueryHandler.d.ts deleted file mode 100644 index 1f05140ac2c..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/AriaQueryHandler.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { InternalQueryHandler } from "./QueryHandler.js"; -/** - * @internal - */ -export declare const ariaHandler: InternalQueryHandler; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/AriaQueryHandler.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/AriaQueryHandler.js deleted file mode 100644 index bc887c168bd..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/AriaQueryHandler.js +++ /dev/null @@ -1,99 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -async function queryAXTree(client, element, accessibleName, role) { - const { nodes } = await client.send("Accessibility.queryAXTree", { - objectId: element._remoteObject.objectId, - accessibleName, - role, - }); - const filteredNodes = nodes.filter((node) => node.role.value !== "text"); - return filteredNodes; -} -function parseAriaSelector(selector) { - const normalize = (value) => value.replace(/ +/g, " ").trim(); - const knownAttributes = new Set(["name", "role"]); - const queryOptions = {}; - const attributeRegexp = - /\[\s*(?\w+)\s*=\s*"(?\\.|[^"\\]*)"\s*\]/g; - const defaultName = selector.replace( - attributeRegexp, - (_, attribute, value) => { - attribute = attribute.trim(); - if (!knownAttributes.has(attribute)) { - throw new Error(`Unknown aria attribute "${attribute}" in selector`); - } - queryOptions[attribute] = normalize(value); - return ""; - }, - ); - if (defaultName && !queryOptions.name) { - queryOptions.name = normalize(defaultName); - } - return queryOptions; -} -const queryOne = async (element, selector) => { - const exeCtx = element.executionContext(); - const { name, role } = parseAriaSelector(selector); - const res = await queryAXTree(exeCtx._client, element, name, role); - if (res.length < 1) { - return null; - } - return exeCtx._adoptBackendNodeId(res[0].backendDOMNodeId); -}; -const waitFor = async (domWorld, selector, options) => { - const binding = { - name: "ariaQuerySelector", - pptrFunction: async (selector) => { - const document = await domWorld._document(); - const element = await queryOne(document, selector); - return element; - }, - }; - return domWorld.waitForSelectorInPage( - (_, selector) => globalThis.ariaQuerySelector(selector), - selector, - options, - binding, - ); -}; -const queryAll = async (element, selector) => { - const exeCtx = element.executionContext(); - const { name, role } = parseAriaSelector(selector); - const res = await queryAXTree(exeCtx._client, element, name, role); - return Promise.all( - res.map((axNode) => exeCtx._adoptBackendNodeId(axNode.backendDOMNodeId)), - ); -}; -const queryAllArray = async (element, selector) => { - const elementHandles = await queryAll(element, selector); - const exeCtx = element.executionContext(); - const jsHandle = exeCtx.evaluateHandle( - (...elements) => elements, - ...elementHandles, - ); - return jsHandle; -}; -/** - * @internal - */ -export const ariaHandler = { - queryOne, - waitFor, - queryAll, - queryAllArray, -}; -//# sourceMappingURL=AriaQueryHandler.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Browser.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Browser.d.ts deleted file mode 100644 index 583774ff577..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Browser.d.ts +++ /dev/null @@ -1,461 +0,0 @@ -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Target } from "./Target.js"; -import { EventEmitter } from "./EventEmitter.js"; -import { Connection } from "./Connection.js"; -import { Page } from "./Page.js"; -import { Viewport } from "./PuppeteerViewport.js"; -/** - * @internal - */ -export declare type BrowserCloseCallback = () => Promise | void; -/** - * @public - */ -export declare type Permission = - | "geolocation" - | "midi" - | "notifications" - | "camera" - | "microphone" - | "background-sync" - | "ambient-light-sensor" - | "accelerometer" - | "gyroscope" - | "magnetometer" - | "accessibility-events" - | "clipboard-read" - | "clipboard-write" - | "payment-handler" - | "idle-detection" - | "midi-sysex"; -/** - * @public - */ -export interface WaitForTargetOptions { - /** - * Maximum wait time in milliseconds. Pass `0` to disable the timeout. - * @defaultValue 30 seconds. - */ - timeout?: number; -} -/** - * All the events a {@link Browser | browser instance} may emit. - * - * @public - */ -export declare const enum BrowserEmittedEvents { - /** - * Emitted when Puppeteer gets disconnected from the Chromium instance. This - * might happen because of one of the following: - * - * - Chromium is closed or crashed - * - * - The {@link Browser.disconnect | browser.disconnect } method was called. - */ - Disconnected = "disconnected", - /** - * Emitted when the url of a target changes. Contains a {@link Target} instance. - * - * @remarks - * - * Note that this includes target changes in incognito browser contexts. - */ - TargetChanged = "targetchanged", - /** - * Emitted when a target is created, for example when a new page is opened by - * {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/open | window.open} - * or by {@link Browser.newPage | browser.newPage} - * - * Contains a {@link Target} instance. - * - * @remarks - * - * Note that this includes target creations in incognito browser contexts. - */ - TargetCreated = "targetcreated", - /** - * Emitted when a target is destroyed, for example when a page is closed. - * Contains a {@link Target} instance. - * - * @remarks - * - * Note that this includes target destructions in incognito browser contexts. - */ - TargetDestroyed = "targetdestroyed", -} -/** - * A Browser is created when Puppeteer connects to a Chromium instance, either through - * {@link PuppeteerNode.launch} or {@link Puppeteer.connect}. - * - * @remarks - * - * The Browser class extends from Puppeteer's {@link EventEmitter} class and will - * emit various events which are documented in the {@link BrowserEmittedEvents} enum. - * - * @example - * - * An example of using a {@link Browser} to create a {@link Page}: - * ```js - * const puppeteer = require('puppeteer'); - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.goto('https://example.com'); - * await browser.close(); - * })(); - * ``` - * - * @example - * - * An example of disconnecting from and reconnecting to a {@link Browser}: - * ```js - * const puppeteer = require('puppeteer'); - * - * (async () => { - * const browser = await puppeteer.launch(); - * // Store the endpoint to be able to reconnect to Chromium - * const browserWSEndpoint = browser.wsEndpoint(); - * // Disconnect puppeteer from Chromium - * browser.disconnect(); - * - * // Use the endpoint to reestablish a connection - * const browser2 = await puppeteer.connect({browserWSEndpoint}); - * // Close Chromium - * await browser2.close(); - * })(); - * ``` - * - * @public - */ -export declare class Browser extends EventEmitter { - /** - * @internal - */ - static create( - connection: Connection, - contextIds: string[], - ignoreHTTPSErrors: boolean, - defaultViewport?: Viewport | null, - process?: Deno.Process, - closeCallback?: BrowserCloseCallback, - ): Promise; - private _ignoreHTTPSErrors; - private _defaultViewport?; - private _process?; - private _connection; - private _closeCallback; - private _defaultContext; - private _contexts; - /** - * @internal - * Used in Target.ts directly so cannot be marked private. - */ - _targets: Map; - /** - * @internal - */ - constructor( - connection: Connection, - contextIds: string[], - ignoreHTTPSErrors: boolean, - defaultViewport?: Viewport | null, - process?: Deno.Process, - closeCallback?: BrowserCloseCallback, - ); - /** - * The spawned browser process. Returns `null` if the browser instance was created with - * {@link Puppeteer.connect}. - */ - process(): Deno.Process | null; - /** - * Creates a new incognito browser context. This won't share cookies/cache with other - * browser contexts. - * - * @example - * ```js - * (async () => { - * const browser = await puppeteer.launch(); - * // Create a new incognito browser context. - * const context = await browser.createIncognitoBrowserContext(); - * // Create a new page in a pristine context. - * const page = await context.newPage(); - * // Do stuff - * await page.goto('https://example.com'); - * })(); - * ``` - */ - createIncognitoBrowserContext(): Promise; - /** - * Returns an array of all open browser contexts. In a newly created browser, this will - * return a single instance of {@link BrowserContext}. - */ - browserContexts(): BrowserContext[]; - /** - * Returns the default browser context. The default browser context cannot be closed. - */ - defaultBrowserContext(): BrowserContext; - /** - * @internal - * Used by BrowserContext directly so cannot be marked private. - */ - _disposeContext(contextId?: string): Promise; - private _targetCreated; - private _targetDestroyed; - private _targetInfoChanged; - /** - * The browser websocket endpoint which can be used as an argument to - * {@link Puppeteer.connect}. - * - * @returns The Browser websocket url. - * - * @remarks - * - * The format is `ws://${host}:${port}/devtools/browser/`. - * - * You can find the `webSocketDebuggerUrl` from `http://${host}:${port}/json/version`. - * Learn more about the - * {@link https://chromedevtools.github.io/devtools-protocol | devtools protocol} and - * the {@link - * https://chromedevtools.github.io/devtools-protocol/#how-do-i-access-the-browser-target - * | browser endpoint}. - */ - wsEndpoint(): string; - /** - * Creates a {@link Page} in the default browser context. - */ - newPage(): Promise; - /** - * @internal - * Used by BrowserContext directly so cannot be marked private. - */ - _createPageInContext(contextId?: string): Promise; - /** - * All active targets inside the Browser. In case of multiple browser contexts, returns - * an array with all the targets in all browser contexts. - */ - targets(): Target[]; - /** - * The target associated with the browser. - */ - target(): Target; - /** - * Searches for a target in all browser contexts. - * - * @param predicate - A function to be run for every target. - * @returns The first target found that matches the `predicate` function. - * - * @example - * - * An example of finding a target for a page opened via `window.open`: - * ```js - * await page.evaluate(() => window.open('https://www.example.com/')); - * const newWindowTarget = await browser.waitForTarget(target => target.url() === 'https://www.example.com/'); - * ``` - */ - waitForTarget( - predicate: (x: Target) => boolean, - options?: WaitForTargetOptions, - ): Promise; - /** - * An array of all open pages inside the Browser. - * - * @remarks - * - * In case of multiple browser contexts, returns an array with all the pages in all - * browser contexts. Non-visible pages, such as `"background_page"`, will not be listed - * here. You can find them using {@link Target.page}. - */ - pages(): Promise; - /** - * A string representing the browser name and version. - * - * @remarks - * - * For headless Chromium, this is similar to `HeadlessChrome/61.0.3153.0`. For - * non-headless, this is similar to `Chrome/61.0.3153.0`. - * - * The format of browser.version() might change with future releases of Chromium. - */ - version(): Promise; - /** - * The browser's original user agent. Pages can override the browser user agent with - * {@link Page.setUserAgent}. - */ - userAgent(): Promise; - /** - * Closes Chromium and all of its pages (if any were opened). The {@link Browser} object - * itself is considered to be disposed and cannot be used anymore. - */ - close(): Promise; - /** - * Disconnects Puppeteer from the browser, but leaves the Chromium process running. - * After calling `disconnect`, the {@link Browser} object is considered disposed and - * cannot be used anymore. - */ - disconnect(): Promise; - /** - * Indicates that the browser is connected. - */ - isConnected(): boolean; - private _getVersion; -} -/** - * @public - */ -export declare const enum BrowserContextEmittedEvents { - /** - * Emitted when the url of a target inside the browser context changes. - * Contains a {@link Target} instance. - */ - TargetChanged = "targetchanged", - /** - * Emitted when a target is created within the browser context, for example - * when a new page is opened by - * {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/open | window.open} - * or by {@link BrowserContext.newPage | browserContext.newPage} - * - * Contains a {@link Target} instance. - */ - TargetCreated = "targetcreated", - /** - * Emitted when a target is destroyed within the browser context, for example - * when a page is closed. Contains a {@link Target} instance. - */ - TargetDestroyed = "targetdestroyed", -} -/** - * BrowserContexts provide a way to operate multiple independent browser - * sessions. When a browser is launched, it has a single BrowserContext used by - * default. The method {@link Browser.newPage | Browser.newPage} creates a page - * in the default browser context. - * - * @remarks - * - * The Browser class extends from Puppeteer's {@link EventEmitter} class and - * will emit various events which are documented in the - * {@link BrowserContextEmittedEvents} enum. - * - * If a page opens another page, e.g. with a `window.open` call, the popup will - * belong to the parent page's browser context. - * - * Puppeteer allows creation of "incognito" browser contexts with - * {@link Browser.createIncognitoBrowserContext | Browser.createIncognitoBrowserContext} - * method. "Incognito" browser contexts don't write any browsing data to disk. - * - * @example - * ```js - * // Create a new incognito browser context - * const context = await browser.createIncognitoBrowserContext(); - * // Create a new page inside context. - * const page = await context.newPage(); - * // ... do stuff with page ... - * await page.goto('https://example.com'); - * // Dispose context once it's no longer needed. - * await context.close(); - * ``` - * @public - */ -export declare class BrowserContext extends EventEmitter { - private _connection; - private _browser; - private _id?; - /** - * @internal - */ - constructor(connection: Connection, browser: Browser, contextId?: string); - /** - * An array of all active targets inside the browser context. - */ - targets(): Target[]; - /** - * This searches for a target in this specific browser context. - * - * @example - * An example of finding a target for a page opened via `window.open`: - * ```js - * await page.evaluate(() => window.open('https://www.example.com/')); - * const newWindowTarget = await browserContext.waitForTarget(target => target.url() === 'https://www.example.com/'); - * ``` - * - * @param predicate - A function to be run for every target - * @param options - An object of options. Accepts a timout, - * which is the maximum wait time in milliseconds. - * Pass `0` to disable the timeout. Defaults to 30 seconds. - * @returns Promise which resolves to the first target found - * that matches the `predicate` function. - */ - waitForTarget(predicate: (x: Target) => boolean, options?: { - timeout?: number; - }): Promise; - /** - * An array of all pages inside the browser context. - * - * @returns Promise which resolves to an array of all open pages. - * Non visible pages, such as `"background_page"`, will not be listed here. - * You can find them using {@link Target.page | the target page}. - */ - pages(): Promise; - /** - * Returns whether BrowserContext is incognito. - * The default browser context is the only non-incognito browser context. - * - * @remarks - * The default browser context cannot be closed. - */ - isIncognito(): boolean; - /** - * @example - * ```js - * const context = browser.defaultBrowserContext(); - * await context.overridePermissions('https://html5demos.com', ['geolocation']); - * ``` - * - * @param origin - The origin to grant permissions to, e.g. "https://example.com". - * @param permissions - An array of permissions to grant. - * All permissions that are not listed here will be automatically denied. - */ - overridePermissions(origin: string, permissions: Permission[]): Promise; - /** - * Clears all permission overrides for the browser context. - * - * @example - * ```js - * const context = browser.defaultBrowserContext(); - * context.overridePermissions('https://example.com', ['clipboard-read']); - * // do stuff .. - * context.clearPermissionOverrides(); - * ``` - */ - clearPermissionOverrides(): Promise; - /** - * Creates a new page in the browser context. - */ - newPage(): Promise; - /** - * The browser this browser context belongs to. - */ - browser(): Browser; - /** - * Closes the browser context. All the targets that belong to the browser context - * will be closed. - * - * @remarks - * Only incognito browser contexts can be closed. - */ - close(): Promise; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Browser.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Browser.js deleted file mode 100644 index 31b3bbbfffc..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Browser.js +++ /dev/null @@ -1,584 +0,0 @@ -/// -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { assert } from "./assert.js"; -import { helper } from "./helper.js"; -import { Target } from "./Target.js"; -import { EventEmitter } from "./EventEmitter.js"; -import { ConnectionEmittedEvents } from "./Connection.js"; -const WEB_PERMISSION_TO_PROTOCOL_PERMISSION = new Map([ - ["geolocation", "geolocation"], - ["midi", "midi"], - ["notifications", "notifications"], - // TODO: push isn't a valid type? - // ['push', 'push'], - ["camera", "videoCapture"], - ["microphone", "audioCapture"], - ["background-sync", "backgroundSync"], - ["ambient-light-sensor", "sensors"], - ["accelerometer", "sensors"], - ["gyroscope", "sensors"], - ["magnetometer", "sensors"], - ["accessibility-events", "accessibilityEvents"], - ["clipboard-read", "clipboardReadWrite"], - ["clipboard-write", "clipboardReadWrite"], - ["payment-handler", "paymentHandler"], - ["idle-detection", "idleDetection"], - // chrome-specific permissions we have. - ["midi-sysex", "midiSysex"], -]); -/** - * A Browser is created when Puppeteer connects to a Chromium instance, either through - * {@link PuppeteerNode.launch} or {@link Puppeteer.connect}. - * - * @remarks - * - * The Browser class extends from Puppeteer's {@link EventEmitter} class and will - * emit various events which are documented in the {@link BrowserEmittedEvents} enum. - * - * @example - * - * An example of using a {@link Browser} to create a {@link Page}: - * ```js - * const puppeteer = require('puppeteer'); - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.goto('https://example.com'); - * await browser.close(); - * })(); - * ``` - * - * @example - * - * An example of disconnecting from and reconnecting to a {@link Browser}: - * ```js - * const puppeteer = require('puppeteer'); - * - * (async () => { - * const browser = await puppeteer.launch(); - * // Store the endpoint to be able to reconnect to Chromium - * const browserWSEndpoint = browser.wsEndpoint(); - * // Disconnect puppeteer from Chromium - * browser.disconnect(); - * - * // Use the endpoint to reestablish a connection - * const browser2 = await puppeteer.connect({browserWSEndpoint}); - * // Close Chromium - * await browser2.close(); - * })(); - * ``` - * - * @public - */ -export class Browser extends EventEmitter { - /** - * @internal - */ - constructor( - connection, - contextIds, - ignoreHTTPSErrors, - defaultViewport, - process, - closeCallback, - ) { - super(); - this._ignoreHTTPSErrors = ignoreHTTPSErrors; - this._defaultViewport = defaultViewport; - this._process = process; - this._connection = connection; - this._closeCallback = closeCallback || function () {}; - this._defaultContext = new BrowserContext(this._connection, this, null); - this._contexts = new Map(); - for (const contextId of contextIds) { - this._contexts.set( - contextId, - new BrowserContext(this._connection, this, contextId), - ); - } - this._targets = new Map(); - this._connection.on( - ConnectionEmittedEvents.Disconnected, - () => this.emit("disconnected" /* Disconnected */), - ); - this._connection.on("Target.targetCreated", this._targetCreated.bind(this)); - this._connection.on( - "Target.targetDestroyed", - this._targetDestroyed.bind(this), - ); - this._connection.on( - "Target.targetInfoChanged", - this._targetInfoChanged.bind(this), - ); - } - /** - * @internal - */ - static async create( - connection, - contextIds, - ignoreHTTPSErrors, - defaultViewport, - process, - closeCallback, - ) { - const browser = new Browser( - connection, - contextIds, - ignoreHTTPSErrors, - defaultViewport, - process, - closeCallback, - ); - await connection.send("Target.setDiscoverTargets", { discover: true }); - return browser; - } - /** - * The spawned browser process. Returns `null` if the browser instance was created with - * {@link Puppeteer.connect}. - */ - process() { - return this._process; - } - /** - * Creates a new incognito browser context. This won't share cookies/cache with other - * browser contexts. - * - * @example - * ```js - * (async () => { - * const browser = await puppeteer.launch(); - * // Create a new incognito browser context. - * const context = await browser.createIncognitoBrowserContext(); - * // Create a new page in a pristine context. - * const page = await context.newPage(); - * // Do stuff - * await page.goto('https://example.com'); - * })(); - * ``` - */ - async createIncognitoBrowserContext() { - const { browserContextId } = await this._connection.send( - "Target.createBrowserContext", - ); - const context = new BrowserContext( - this._connection, - this, - browserContextId, - ); - this._contexts.set(browserContextId, context); - return context; - } - /** - * Returns an array of all open browser contexts. In a newly created browser, this will - * return a single instance of {@link BrowserContext}. - */ - browserContexts() { - return [this._defaultContext, ...Array.from(this._contexts.values())]; - } - /** - * Returns the default browser context. The default browser context cannot be closed. - */ - defaultBrowserContext() { - return this._defaultContext; - } - /** - * @internal - * Used by BrowserContext directly so cannot be marked private. - */ - async _disposeContext(contextId) { - await this._connection.send("Target.disposeBrowserContext", { - browserContextId: contextId || undefined, - }); - this._contexts.delete(contextId); - } - async _targetCreated(event) { - const targetInfo = event.targetInfo; - const { browserContextId } = targetInfo; - const context = browserContextId && this._contexts.has(browserContextId) - ? this._contexts.get(browserContextId) - : this._defaultContext; - const target = new Target( - targetInfo, - context, - () => this._connection.createSession(targetInfo), - this._ignoreHTTPSErrors, - this._defaultViewport, - ); - assert( - !this._targets.has(event.targetInfo.targetId), - "Target should not exist before targetCreated", - ); - this._targets.set(event.targetInfo.targetId, target); - if (await target._initializedPromise) { - this.emit("targetcreated", /* TargetCreated */ target); - context.emit("targetcreated", /* TargetCreated */ target); - } - } - async _targetDestroyed(event) { - const target = this._targets.get(event.targetId); - target._initializedCallback(false); - this._targets.delete(event.targetId); - target._closedCallback(); - if (await target._initializedPromise) { - this.emit("targetdestroyed", /* TargetDestroyed */ target); - target - .browserContext() - .emit("targetdestroyed", /* TargetDestroyed */ target); - } - } - _targetInfoChanged(event) { - const target = this._targets.get(event.targetInfo.targetId); - assert(target, "target should exist before targetInfoChanged"); - const previousURL = target.url(); - const wasInitialized = target._isInitialized; - target._targetInfoChanged(event.targetInfo); - if (wasInitialized && previousURL !== target.url()) { - this.emit("targetchanged", /* TargetChanged */ target); - target - .browserContext() - .emit("targetchanged", /* TargetChanged */ target); - } - } - /** - * The browser websocket endpoint which can be used as an argument to - * {@link Puppeteer.connect}. - * - * @returns The Browser websocket url. - * - * @remarks - * - * The format is `ws://${host}:${port}/devtools/browser/`. - * - * You can find the `webSocketDebuggerUrl` from `http://${host}:${port}/json/version`. - * Learn more about the - * {@link https://chromedevtools.github.io/devtools-protocol | devtools protocol} and - * the {@link - * https://chromedevtools.github.io/devtools-protocol/#how-do-i-access-the-browser-target - * | browser endpoint}. - */ - wsEndpoint() { - return this._connection.url(); - } - /** - * Creates a {@link Page} in the default browser context. - */ - async newPage() { - return this._defaultContext.newPage(); - } - /** - * @internal - * Used by BrowserContext directly so cannot be marked private. - */ - async _createPageInContext(contextId) { - const { targetId } = await this._connection.send("Target.createTarget", { - url: "about:blank", - browserContextId: contextId || undefined, - }); - const target = await this._targets.get(targetId); - assert( - await target._initializedPromise, - "Failed to create target for page", - ); - const page = await target.page(); - return page; - } - /** - * All active targets inside the Browser. In case of multiple browser contexts, returns - * an array with all the targets in all browser contexts. - */ - targets() { - return Array.from(this._targets.values()).filter((target) => - target._isInitialized - ); - } - /** - * The target associated with the browser. - */ - target() { - return this.targets().find((target) => target.type() === "browser"); - } - /** - * Searches for a target in all browser contexts. - * - * @param predicate - A function to be run for every target. - * @returns The first target found that matches the `predicate` function. - * - * @example - * - * An example of finding a target for a page opened via `window.open`: - * ```js - * await page.evaluate(() => window.open('https://www.example.com/')); - * const newWindowTarget = await browser.waitForTarget(target => target.url() === 'https://www.example.com/'); - * ``` - */ - async waitForTarget(predicate, options = {}) { - const { timeout = 30000 } = options; - const existingTarget = this.targets().find(predicate); - if (existingTarget) { - return existingTarget; - } - let resolve; - const targetPromise = new Promise((x) => (resolve = x)); - this.on("targetcreated", /* TargetCreated */ check); - this.on("targetchanged", /* TargetChanged */ check); - try { - if (!timeout) { - return await targetPromise; - } - return await helper.waitWithTimeout(targetPromise, "target", timeout); - } finally { - this.removeListener("targetcreated", /* TargetCreated */ check); - this.removeListener("targetchanged", /* TargetChanged */ check); - } - function check(target) { - if (predicate(target)) { - resolve(target); - } - } - } - /** - * An array of all open pages inside the Browser. - * - * @remarks - * - * In case of multiple browser contexts, returns an array with all the pages in all - * browser contexts. Non-visible pages, such as `"background_page"`, will not be listed - * here. You can find them using {@link Target.page}. - */ - async pages() { - const contextPages = await Promise.all( - this.browserContexts().map((context) => context.pages()), - ); - // Flatten array. - return contextPages.reduce((acc, x) => acc.concat(x), []); - } - /** - * A string representing the browser name and version. - * - * @remarks - * - * For headless Chromium, this is similar to `HeadlessChrome/61.0.3153.0`. For - * non-headless, this is similar to `Chrome/61.0.3153.0`. - * - * The format of browser.version() might change with future releases of Chromium. - */ - async version() { - const version = await this._getVersion(); - return version.product; - } - /** - * The browser's original user agent. Pages can override the browser user agent with - * {@link Page.setUserAgent}. - */ - async userAgent() { - const version = await this._getVersion(); - return version.userAgent; - } - /** - * Closes Chromium and all of its pages (if any were opened). The {@link Browser} object - * itself is considered to be disposed and cannot be used anymore. - */ - async close() { - await this._closeCallback.call(null); - await this.disconnect(); - } - /** - * Disconnects Puppeteer from the browser, but leaves the Chromium process running. - * After calling `disconnect`, the {@link Browser} object is considered disposed and - * cannot be used anymore. - */ - async disconnect() { - await this._connection.dispose(); - } - /** - * Indicates that the browser is connected. - */ - isConnected() { - return !this._connection._closed; - } - _getVersion() { - return this._connection.send("Browser.getVersion"); - } -} -/** - * BrowserContexts provide a way to operate multiple independent browser - * sessions. When a browser is launched, it has a single BrowserContext used by - * default. The method {@link Browser.newPage | Browser.newPage} creates a page - * in the default browser context. - * - * @remarks - * - * The Browser class extends from Puppeteer's {@link EventEmitter} class and - * will emit various events which are documented in the - * {@link BrowserContextEmittedEvents} enum. - * - * If a page opens another page, e.g. with a `window.open` call, the popup will - * belong to the parent page's browser context. - * - * Puppeteer allows creation of "incognito" browser contexts with - * {@link Browser.createIncognitoBrowserContext | Browser.createIncognitoBrowserContext} - * method. "Incognito" browser contexts don't write any browsing data to disk. - * - * @example - * ```js - * // Create a new incognito browser context - * const context = await browser.createIncognitoBrowserContext(); - * // Create a new page inside context. - * const page = await context.newPage(); - * // ... do stuff with page ... - * await page.goto('https://example.com'); - * // Dispose context once it's no longer needed. - * await context.close(); - * ``` - * @public - */ -export class BrowserContext extends EventEmitter { - /** - * @internal - */ - constructor(connection, browser, contextId) { - super(); - this._connection = connection; - this._browser = browser; - this._id = contextId; - } - /** - * An array of all active targets inside the browser context. - */ - targets() { - return this._browser - .targets() - .filter((target) => target.browserContext() === this); - } - /** - * This searches for a target in this specific browser context. - * - * @example - * An example of finding a target for a page opened via `window.open`: - * ```js - * await page.evaluate(() => window.open('https://www.example.com/')); - * const newWindowTarget = await browserContext.waitForTarget(target => target.url() === 'https://www.example.com/'); - * ``` - * - * @param predicate - A function to be run for every target - * @param options - An object of options. Accepts a timout, - * which is the maximum wait time in milliseconds. - * Pass `0` to disable the timeout. Defaults to 30 seconds. - * @returns Promise which resolves to the first target found - * that matches the `predicate` function. - */ - waitForTarget(predicate, options = {}) { - return this._browser.waitForTarget( - (target) => target.browserContext() === this && predicate(target), - options, - ); - } - /** - * An array of all pages inside the browser context. - * - * @returns Promise which resolves to an array of all open pages. - * Non visible pages, such as `"background_page"`, will not be listed here. - * You can find them using {@link Target.page | the target page}. - */ - async pages() { - const pages = await Promise.all( - this.targets() - .filter((target) => target.type() === "page") - .map((target) => target.page()), - ); - return pages.filter((page) => !!page); - } - /** - * Returns whether BrowserContext is incognito. - * The default browser context is the only non-incognito browser context. - * - * @remarks - * The default browser context cannot be closed. - */ - isIncognito() { - return !!this._id; - } - /** - * @example - * ```js - * const context = browser.defaultBrowserContext(); - * await context.overridePermissions('https://html5demos.com', ['geolocation']); - * ``` - * - * @param origin - The origin to grant permissions to, e.g. "https://example.com". - * @param permissions - An array of permissions to grant. - * All permissions that are not listed here will be automatically denied. - */ - async overridePermissions(origin, permissions) { - const protocolPermissions = permissions.map((permission) => { - const protocolPermission = WEB_PERMISSION_TO_PROTOCOL_PERMISSION.get( - permission, - ); - if (!protocolPermission) { - throw new Error("Unknown permission: " + permission); - } - return protocolPermission; - }); - await this._connection.send("Browser.grantPermissions", { - origin, - browserContextId: this._id || undefined, - permissions: protocolPermissions, - }); - } - /** - * Clears all permission overrides for the browser context. - * - * @example - * ```js - * const context = browser.defaultBrowserContext(); - * context.overridePermissions('https://example.com', ['clipboard-read']); - * // do stuff .. - * context.clearPermissionOverrides(); - * ``` - */ - async clearPermissionOverrides() { - await this._connection.send("Browser.resetPermissions", { - browserContextId: this._id || undefined, - }); - } - /** - * Creates a new page in the browser context. - */ - newPage() { - return this._browser._createPageInContext(this._id); - } - /** - * The browser this browser context belongs to. - */ - browser() { - return this._browser; - } - /** - * Closes the browser context. All the targets that belong to the browser context - * will be closed. - * - * @remarks - * Only incognito browser contexts can be closed. - */ - async close() { - assert(this._id, "Non-incognito profiles cannot be closed!"); - await this._browser._disposeContext(this._id); - } -} -//# sourceMappingURL=Browser.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/BrowserConnector.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/BrowserConnector.d.ts deleted file mode 100644 index cc6d153c2d9..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/BrowserConnector.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { ConnectionTransport } from "./ConnectionTransport.js"; -import { Browser } from "./Browser.js"; -import { Viewport } from "./PuppeteerViewport.js"; -/** - * Generic browser options that can be passed when launching any browser or when - * connecting to an existing browser instance. - * @public - */ -export interface BrowserConnectOptions { - /** - * Whether to ignore HTTPS errors during navigation. - * @defaultValue false - */ - ignoreHTTPSErrors?: boolean; - /** - * Sets the viewport for each page. - */ - defaultViewport?: Viewport | null; - /** - * Slows down Puppeteer operations by the specified amount of milliseconds to - * aid debugging. - */ - slowMo?: number; -} -/** - * Users should never call this directly; it's called when calling - * `puppeteer.connect`. - * @internal - */ -export declare const connectToBrowser: ( - options: BrowserConnectOptions & { - browserWSEndpoint?: string; - browserURL?: string; - transport?: ConnectionTransport; - }, -) => Promise; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/BrowserConnector.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/BrowserConnector.js deleted file mode 100644 index e57530f74d4..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/BrowserConnector.js +++ /dev/null @@ -1,89 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Browser } from "./Browser.js"; -import { assert } from "./assert.js"; -import { debugError } from "../common/helper.js"; -import { Connection } from "./Connection.js"; -import { getFetch } from "./fetch.js"; -import { BrowserWebSocketTransport } from "./BrowserWebSocketTransport.js"; -const getWebSocketTransportClass = () => { - return Promise.resolve(BrowserWebSocketTransport); -}; -/** - * Users should never call this directly; it's called when calling - * `puppeteer.connect`. - * @internal - */ -export const connectToBrowser = async (options) => { - const { - browserWSEndpoint, - browserURL, - ignoreHTTPSErrors = false, - defaultViewport = { width: 800, height: 600 }, - transport, - slowMo = 0, - } = options; - assert( - Number(!!browserWSEndpoint) + Number(!!browserURL) + Number(!!transport) === - 1, - "Exactly one of browserWSEndpoint, browserURL or transport must be passed to puppeteer.connect", - ); - let connection = null; - if (transport) { - connection = new Connection("", transport, slowMo); - } else if (browserWSEndpoint) { - const WebSocketClass = await getWebSocketTransportClass(); - const connectionTransport = await WebSocketClass.create(browserWSEndpoint); - connection = new Connection(browserWSEndpoint, connectionTransport, slowMo); - } else if (browserURL) { - const connectionURL = await getWSEndpoint(browserURL); - const WebSocketClass = await getWebSocketTransportClass(); - const connectionTransport = await WebSocketClass.create(connectionURL); - connection = new Connection(connectionURL, connectionTransport, slowMo); - } - const { browserContextIds } = await connection.send( - "Target.getBrowserContexts", - ); - return Browser.create( - connection, - browserContextIds, - ignoreHTTPSErrors, - defaultViewport, - null, - () => connection.send("Browser.close").catch(debugError), - ); -}; -async function getWSEndpoint(browserURL) { - const endpointURL = new URL("/json/version", browserURL); - const fetch = await getFetch(); - try { - const result = await fetch(endpointURL.toString(), { - method: "GET", - }); - if (!result.ok) { - throw new Error(`HTTP ${result.statusText}`); - } - const data = await result.json(); - return data.webSocketDebuggerUrl; - } catch (error) { - error.message = - `Failed to fetch browser webSocket URL from ${endpointURL}: ` + - error.message; - throw error; - } -} -//# sourceMappingURL=BrowserConnector.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/BrowserWebSocketTransport.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/BrowserWebSocketTransport.d.ts deleted file mode 100644 index fa7c0b00f3a..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/BrowserWebSocketTransport.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { ConnectionTransport } from "./ConnectionTransport.js"; -export declare class BrowserWebSocketTransport implements ConnectionTransport { - static create(url: string): Promise; - private _ws; - onmessage?: (message: string) => void; - onclose?: () => void; - constructor(ws: WebSocket); - send(message: string): void; - close(): Promise; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/BrowserWebSocketTransport.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/BrowserWebSocketTransport.js deleted file mode 100644 index 6d59271a9fd..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/BrowserWebSocketTransport.js +++ /dev/null @@ -1,44 +0,0 @@ -/// -export class BrowserWebSocketTransport { - constructor(ws) { - this._ws = ws; - this._ws.addEventListener("message", (event) => { - if (this.onmessage) { - this.onmessage.call(null, event.data); - } - }); - this._ws.addEventListener("close", () => { - this._closed = true; - if (this.onclose) { - this.onclose.call(null); - } - }); - // Silently ignore all errors - we don't know what to do with them. - this._ws.addEventListener("error", () => {}); - this._closed = false; - this.onmessage = null; - this.onclose = null; - } - static create(url) { - return new Promise((resolve, reject) => { - const ws = new WebSocket(url); - ws.addEventListener( - "open", - () => resolve(new BrowserWebSocketTransport(ws)), - ); - ws.addEventListener("error", reject); - }); - } - send(message) { - this._ws.send(message); - } - close() { - return new Promise((resolve, reject) => { - this._ws.addEventListener("close", () => resolve()); - this._ws.addEventListener("error", (err) => reject(err)); - this._ws.close(); - if (this._closed) resolve(); - }); - } -} -//# sourceMappingURL=BrowserWebSocketTransport.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Connection.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Connection.d.ts deleted file mode 100644 index aba2240ceb3..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Connection.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { Protocol } from "../../vendor/devtools-protocol/types/protocol.d.ts"; -import { ProtocolMapping } from "../../vendor/devtools-protocol/types/protocol-mapping.d.ts"; -import { ConnectionTransport } from "./ConnectionTransport.js"; -import { EventEmitter } from "./EventEmitter.js"; -/** - * @public - */ -export { ConnectionTransport, ProtocolMapping }; -/** - * @public - */ -export interface ConnectionCallback { - resolve: Function; - reject: Function; - error: Error; - method: string; -} -/** - * Internal events that the Connection class emits. - * - * @internal - */ -export declare const ConnectionEmittedEvents: { - readonly Disconnected: symbol; -}; -/** - * @internal - */ -export declare class Connection extends EventEmitter { - _url: string; - _transport: ConnectionTransport; - _delay: number; - _lastId: number; - _sessions: Map; - _closed: boolean; - _callbacks: Map; - constructor(url: string, transport: ConnectionTransport, delay?: number); - static fromSession(session: CDPSession): Connection; - /** - * @param sessionId - The session id - * @returns The current CDP session if it exists - */ - session(sessionId: string): CDPSession | null; - url(): string; - send( - method: T, - ...paramArgs: ProtocolMapping.Commands[T]["paramsType"] - ): Promise; - _rawSend(message: Record): number; - _onMessage(message: string): Promise; - _onClose(): void; - dispose(): Promise; - /** - * @param targetInfo - The target info - * @returns The CDP session that is created - */ - createSession(targetInfo: Protocol.Target.TargetInfo): Promise; -} -/** - * @public - */ -export interface CDPSessionOnMessageObject { - id?: number; - method: string; - params: Record; - error: { - message: string; - data: any; - }; - result?: any; -} -/** - * Internal events that the CDPSession class emits. - * - * @internal - */ -export declare const CDPSessionEmittedEvents: { - readonly Disconnected: symbol; -}; -/** - * The `CDPSession` instances are used to talk raw Chrome Devtools Protocol. - * - * @remarks - * - * Protocol methods can be called with {@link CDPSession.send} method and protocol - * events can be subscribed to with `CDPSession.on` method. - * - * Useful links: {@link https://chromedevtools.github.io/devtools-protocol/ | DevTools Protocol Viewer} - * and {@link https://github.com/aslushnikov/getting-started-with-cdp/blob/master/README.md | Getting Started with DevTools Protocol}. - * - * @example - * ```js - * const client = await page.target().createCDPSession(); - * await client.send('Animation.enable'); - * client.on('Animation.animationCreated', () => console.log('Animation created!')); - * const response = await client.send('Animation.getPlaybackRate'); - * console.log('playback rate is ' + response.playbackRate); - * await client.send('Animation.setPlaybackRate', { - * playbackRate: response.playbackRate / 2 - * }); - * ``` - * - * @public - */ -export declare class CDPSession extends EventEmitter { - /** - * @internal - */ - _connection: Connection; - private _sessionId; - private _targetType; - private _callbacks; - /** - * @internal - */ - constructor(connection: Connection, targetType: string, sessionId: string); - send( - method: T, - ...paramArgs: ProtocolMapping.Commands[T]["paramsType"] - ): Promise; - /** - * @internal - */ - _onMessage(object: CDPSessionOnMessageObject): void; - /** - * Detaches the cdpSession from the target. Once detached, the cdpSession object - * won't emit any events and can't be used to send messages. - */ - detach(): Promise; - /** - * @internal - */ - _onClosed(): void; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Connection.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Connection.js deleted file mode 100644 index 9c9702812f7..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Connection.js +++ /dev/null @@ -1,301 +0,0 @@ -/// -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { assert } from "./assert.js"; -import { debug } from "./Debug.js"; -const debugProtocolSend = debug("puppeteer:protocol:SEND ►"); -const debugProtocolReceive = debug("puppeteer:protocol:RECV ◀"); -import { EventEmitter } from "./EventEmitter.js"; -/** - * Internal events that the Connection class emits. - * - * @internal - */ -export const ConnectionEmittedEvents = { - Disconnected: Symbol("Connection.Disconnected"), -}; -/** - * @internal - */ -export class Connection extends EventEmitter { - constructor(url, transport, delay = 0) { - super(); - this._lastId = 0; - this._sessions = new Map(); - this._closed = false; - this._callbacks = new Map(); - this._url = url; - this._delay = delay; - this._transport = transport; - this._transport.onmessage = this._onMessage.bind(this); - this._transport.onclose = this._onClose.bind(this); - } - static fromSession(session) { - return session._connection; - } - /** - * @param sessionId - The session id - * @returns The current CDP session if it exists - */ - session(sessionId) { - return this._sessions.get(sessionId) || null; - } - url() { - return this._url; - } - send(method, ...paramArgs) { - // There is only ever 1 param arg passed, but the Protocol defines it as an - // array of 0 or 1 items See this comment: - // https://github.com/ChromeDevTools/devtools-protocol/pull/113#issuecomment-412603285 - // which explains why the protocol defines the params this way for better - // type-inference. - // So now we check if there are any params or not and deal with them accordingly. - const params = paramArgs.length ? paramArgs[0] : undefined; - const id = this._rawSend({ method, params }); - return new Promise((resolve, reject) => { - this._callbacks.set(id, { resolve, reject, error: new Error(), method }); - }); - } - _rawSend(message) { - const id = ++this._lastId; - const stringifiedMessage = JSON.stringify( - Object.assign({}, message, { id }), - ); - debugProtocolSend(stringifiedMessage); - this._transport.send(stringifiedMessage); - return id; - } - async _onMessage(message) { - if (this._delay) { - await new Promise((f) => setTimeout(f, this._delay)); - } - debugProtocolReceive(message); - const object = JSON.parse(message); - if (object.method === "Target.attachedToTarget") { - const sessionId = object.params.sessionId; - const session = new CDPSession( - this, - object.params.targetInfo.type, - sessionId, - ); - this._sessions.set(sessionId, session); - } else if (object.method === "Target.detachedFromTarget") { - const session = this._sessions.get(object.params.sessionId); - if (session) { - session._onClosed(); - this._sessions.delete(object.params.sessionId); - } - } - if (object.sessionId) { - const session = this._sessions.get(object.sessionId); - if (session) { - session._onMessage(object); - } - } else if (object.id) { - const callback = this._callbacks.get(object.id); - // Callbacks could be all rejected if someone has called `.dispose()`. - if (callback) { - this._callbacks.delete(object.id); - if (object.error) { - callback.reject( - createProtocolError(callback.error, callback.method, object), - ); - } else { - callback.resolve(object.result); - } - } - } else { - this.emit(object.method, object.params); - } - } - _onClose() { - if (this._closed) { - return; - } - this._closed = true; - this._transport.onmessage = null; - this._transport.onclose = null; - for (const callback of this._callbacks.values()) { - callback.reject( - rewriteError( - callback.error, - `Protocol error (${callback.method}): Target closed.`, - ), - ); - } - this._callbacks.clear(); - for (const session of this._sessions.values()) { - session._onClosed(); - } - this._sessions.clear(); - this.emit(ConnectionEmittedEvents.Disconnected); - } - async dispose() { - this._onClose(); - await this._transport.close(); - } - /** - * @param targetInfo - The target info - * @returns The CDP session that is created - */ - async createSession(targetInfo) { - const { sessionId } = await this.send("Target.attachToTarget", { - targetId: targetInfo.targetId, - flatten: true, - }); - return this._sessions.get(sessionId); - } -} -/** - * Internal events that the CDPSession class emits. - * - * @internal - */ -export const CDPSessionEmittedEvents = { - Disconnected: Symbol("CDPSession.Disconnected"), -}; -/** - * The `CDPSession` instances are used to talk raw Chrome Devtools Protocol. - * - * @remarks - * - * Protocol methods can be called with {@link CDPSession.send} method and protocol - * events can be subscribed to with `CDPSession.on` method. - * - * Useful links: {@link https://chromedevtools.github.io/devtools-protocol/ | DevTools Protocol Viewer} - * and {@link https://github.com/aslushnikov/getting-started-with-cdp/blob/master/README.md | Getting Started with DevTools Protocol}. - * - * @example - * ```js - * const client = await page.target().createCDPSession(); - * await client.send('Animation.enable'); - * client.on('Animation.animationCreated', () => console.log('Animation created!')); - * const response = await client.send('Animation.getPlaybackRate'); - * console.log('playback rate is ' + response.playbackRate); - * await client.send('Animation.setPlaybackRate', { - * playbackRate: response.playbackRate / 2 - * }); - * ``` - * - * @public - */ -export class CDPSession extends EventEmitter { - /** - * @internal - */ - constructor(connection, targetType, sessionId) { - super(); - this._callbacks = new Map(); - this._connection = connection; - this._targetType = targetType; - this._sessionId = sessionId; - } - send(method, ...paramArgs) { - if (!this._connection) { - return Promise.reject( - new Error( - `Protocol error (${method}): Session closed. Most likely the ${this._targetType} has been closed.`, - ), - ); - } - // See the comment in Connection#send explaining why we do this. - const params = paramArgs.length ? paramArgs[0] : undefined; - const id = this._connection._rawSend({ - sessionId: this._sessionId, - method, - /* TODO(jacktfranklin@): once this Firefox bug is solved - * we no longer need the `|| {}` check - * https://bugzilla.mozilla.org/show_bug.cgi?id=1631570 - */ - params: params || {}, - }); - return new Promise((resolve, reject) => { - this._callbacks.set(id, { resolve, reject, error: new Error(), method }); - }); - } - /** - * @internal - */ - _onMessage(object) { - if (object.id && this._callbacks.has(object.id)) { - const callback = this._callbacks.get(object.id); - this._callbacks.delete(object.id); - if (object.error) { - callback.reject( - createProtocolError(callback.error, callback.method, object), - ); - } else { - callback.resolve(object.result); - } - } else { - assert(!object.id); - this.emit(object.method, object.params); - } - } - /** - * Detaches the cdpSession from the target. Once detached, the cdpSession object - * won't emit any events and can't be used to send messages. - */ - async detach() { - if (!this._connection) { - throw new Error( - `Session already detached. Most likely the ${this._targetType} has been closed.`, - ); - } - await this._connection.send("Target.detachFromTarget", { - sessionId: this._sessionId, - }); - } - /** - * @internal - */ - _onClosed() { - for (const callback of this._callbacks.values()) { - callback.reject( - rewriteError( - callback.error, - `Protocol error (${callback.method}): Target closed.`, - ), - ); - } - this._callbacks.clear(); - this._connection = null; - this.emit(CDPSessionEmittedEvents.Disconnected); - } -} -/** - * @param {!Error} error - * @param {string} method - * @param {{error: {message: string, data: any}}} object - * @returns {!Error} - */ -function createProtocolError(error, method, object) { - let message = `Protocol error (${method}): ${object.error.message}`; - if ("data" in object.error) { - message += ` ${object.error.data}`; - } - return rewriteError(error, message); -} -/** - * @param {!Error} error - * @param {string} message - * @returns {!Error} - */ -function rewriteError(error, message) { - error.message = message; - return error; -} -//# sourceMappingURL=Connection.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ConnectionTransport.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ConnectionTransport.d.ts deleted file mode 100644 index 830c8bf6c82..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ConnectionTransport.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @public - */ -export interface ConnectionTransport { - send(string: any): any; - close(): any; - onmessage?: (message: string) => void; - onclose?: () => void; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ConnectionTransport.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ConnectionTransport.js deleted file mode 100644 index 470ec0ec643..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ConnectionTransport.js +++ /dev/null @@ -1,18 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export {}; -//# sourceMappingURL=ConnectionTransport.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ConsoleMessage.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ConsoleMessage.d.ts deleted file mode 100644 index dc3b871a1e9..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ConsoleMessage.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { JSHandle } from "./JSHandle.js"; -/** - * @public - */ -export interface ConsoleMessageLocation { - /** - * URL of the resource if known or `undefined` otherwise. - */ - url?: string; - /** - * 0-based line number in the resource if known or `undefined` otherwise. - */ - lineNumber?: number; - /** - * 0-based column number in the resource if known or `undefined` otherwise. - */ - columnNumber?: number; -} -/** - * The supported types for console messages. - * @public - */ -export declare type ConsoleMessageType = - | "log" - | "debug" - | "info" - | "error" - | "warning" - | "dir" - | "dirxml" - | "table" - | "trace" - | "clear" - | "startGroup" - | "startGroupCollapsed" - | "endGroup" - | "assert" - | "profile" - | "profileEnd" - | "count" - | "timeEnd" - | "verbose"; -/** - * ConsoleMessage objects are dispatched by page via the 'console' event. - * @public - */ -export declare class ConsoleMessage { - private _type; - private _text; - private _args; - private _stackTraceLocations; - /** - * @public - */ - constructor( - type: ConsoleMessageType, - text: string, - args: JSHandle[], - stackTraceLocations: ConsoleMessageLocation[], - ); - /** - * @returns The type of the console message. - */ - type(): ConsoleMessageType; - /** - * @returns The text of the console message. - */ - text(): string; - /** - * @returns An array of arguments passed to the console. - */ - args(): JSHandle[]; - /** - * @returns The location of the console message. - */ - location(): ConsoleMessageLocation; - /** - * @returns The array of locations on the stack of the console message. - */ - stackTrace(): ConsoleMessageLocation[]; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ConsoleMessage.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ConsoleMessage.js deleted file mode 100644 index ab0076bc3f5..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ConsoleMessage.js +++ /dev/null @@ -1,62 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * ConsoleMessage objects are dispatched by page via the 'console' event. - * @public - */ -export class ConsoleMessage { - /** - * @public - */ - constructor(type, text, args, stackTraceLocations) { - this._type = type; - this._text = text; - this._args = args; - this._stackTraceLocations = stackTraceLocations; - } - /** - * @returns The type of the console message. - */ - type() { - return this._type; - } - /** - * @returns The text of the console message. - */ - text() { - return this._text; - } - /** - * @returns An array of arguments passed to the console. - */ - args() { - return this._args; - } - /** - * @returns The location of the console message. - */ - location() { - return this._stackTraceLocations.length ? this._stackTraceLocations[0] : {}; - } - /** - * @returns The array of locations on the stack of the console message. - */ - stackTrace() { - return this._stackTraceLocations; - } -} -//# sourceMappingURL=ConsoleMessage.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Coverage.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Coverage.d.ts deleted file mode 100644 index 922d34df233..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Coverage.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { PuppeteerEventListener } from "./helper.js"; -import { Protocol } from "../../vendor/devtools-protocol/types/protocol.d.ts"; -import { CDPSession } from "./Connection.js"; -/** - * @internal - */ -export { PuppeteerEventListener }; -/** - * The CoverageEntry class represents one entry of the coverage report. - * @public - */ -export interface CoverageEntry { - /** - * The URL of the style sheet or script. - */ - url: string; - /** - * The content of the style sheet or script. - */ - text: string; - /** - * The covered range as start and end positions. - */ - ranges: Array<{ - start: number; - end: number; - }>; -} -/** - * Set of configurable options for JS coverage. - * @public - */ -export interface JSCoverageOptions { - /** - * Whether to reset coverage on every navigation. - */ - resetOnNavigation?: boolean; - /** - * Whether anonymous scripts generated by the page should be reported. - */ - reportAnonymousScripts?: boolean; -} -/** - * Set of configurable options for CSS coverage. - * @public - */ -export interface CSSCoverageOptions { - /** - * Whether to reset coverage on every navigation. - */ - resetOnNavigation?: boolean; -} -/** - * The Coverage class provides methods to gathers information about parts of - * JavaScript and CSS that were used by the page. - * - * @remarks - * To output coverage in a form consumable by {@link https://github.com/istanbuljs | Istanbul}, - * see {@link https://github.com/istanbuljs/puppeteer-to-istanbul | puppeteer-to-istanbul}. - * - * @example - * An example of using JavaScript and CSS coverage to get percentage of initially - * executed code: - * ```js - * // Enable both JavaScript and CSS coverage - * await Promise.all([ - * page.coverage.startJSCoverage(), - * page.coverage.startCSSCoverage() - * ]); - * // Navigate to page - * await page.goto('https://example.com'); - * // Disable both JavaScript and CSS coverage - * const [jsCoverage, cssCoverage] = await Promise.all([ - * page.coverage.stopJSCoverage(), - * page.coverage.stopCSSCoverage(), - * ]); - * let totalBytes = 0; - * let usedBytes = 0; - * const coverage = [...jsCoverage, ...cssCoverage]; - * for (const entry of coverage) { - * totalBytes += entry.text.length; - * for (const range of entry.ranges) - * usedBytes += range.end - range.start - 1; - * } - * console.log(`Bytes used: ${usedBytes / totalBytes * 100}%`); - * ``` - * @public - */ -export declare class Coverage { - /** - * @internal - */ - _jsCoverage: JSCoverage; - /** - * @internal - */ - _cssCoverage: CSSCoverage; - constructor(client: CDPSession); - /** - * @param options - defaults to - * `{ resetOnNavigation : true, reportAnonymousScripts : false }` - * @returns Promise that resolves when coverage is started. - * - * @remarks - * Anonymous scripts are ones that don't have an associated url. These are - * scripts that are dynamically created on the page using `eval` or - * `new Function`. If `reportAnonymousScripts` is set to `true`, anonymous - * scripts will have `__puppeteer_evaluation_script__` as their URL. - */ - startJSCoverage(options?: JSCoverageOptions): Promise; - /** - * @returns Promise that resolves to the array of coverage reports for - * all scripts. - * - * @remarks - * JavaScript Coverage doesn't include anonymous scripts by default. - * However, scripts with sourceURLs are reported. - */ - stopJSCoverage(): Promise; - /** - * @param options - defaults to `{ resetOnNavigation : true }` - * @returns Promise that resolves when coverage is started. - */ - startCSSCoverage(options?: CSSCoverageOptions): Promise; - /** - * @returns Promise that resolves to the array of coverage reports - * for all stylesheets. - * @remarks - * CSS Coverage doesn't include dynamically injected style tags - * without sourceURLs. - */ - stopCSSCoverage(): Promise; -} -/** - * @public - */ -export declare class JSCoverage { - _client: CDPSession; - _enabled: boolean; - _scriptURLs: Map; - _scriptSources: Map; - _eventListeners: PuppeteerEventListener[]; - _resetOnNavigation: boolean; - _reportAnonymousScripts: boolean; - constructor(client: CDPSession); - start(options?: { - resetOnNavigation?: boolean; - reportAnonymousScripts?: boolean; - }): Promise; - _onExecutionContextsCleared(): void; - _onScriptParsed(event: Protocol.Debugger.ScriptParsedEvent): Promise; - stop(): Promise; -} -/** - * @public - */ -export declare class CSSCoverage { - _client: CDPSession; - _enabled: boolean; - _stylesheetURLs: Map; - _stylesheetSources: Map; - _eventListeners: PuppeteerEventListener[]; - _resetOnNavigation: boolean; - _reportAnonymousScripts: boolean; - constructor(client: CDPSession); - start(options?: { - resetOnNavigation?: boolean; - }): Promise; - _onExecutionContextsCleared(): void; - _onStyleSheet(event: Protocol.CSS.StyleSheetAddedEvent): Promise; - stop(): Promise; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Coverage.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Coverage.js deleted file mode 100644 index 1ecfb9b5d77..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Coverage.js +++ /dev/null @@ -1,357 +0,0 @@ -/// -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { assert } from "./assert.js"; -import { debugError, helper } from "./helper.js"; -import { EVALUATION_SCRIPT_URL } from "./ExecutionContext.js"; -/** - * The Coverage class provides methods to gathers information about parts of - * JavaScript and CSS that were used by the page. - * - * @remarks - * To output coverage in a form consumable by {@link https://github.com/istanbuljs | Istanbul}, - * see {@link https://github.com/istanbuljs/puppeteer-to-istanbul | puppeteer-to-istanbul}. - * - * @example - * An example of using JavaScript and CSS coverage to get percentage of initially - * executed code: - * ```js - * // Enable both JavaScript and CSS coverage - * await Promise.all([ - * page.coverage.startJSCoverage(), - * page.coverage.startCSSCoverage() - * ]); - * // Navigate to page - * await page.goto('https://example.com'); - * // Disable both JavaScript and CSS coverage - * const [jsCoverage, cssCoverage] = await Promise.all([ - * page.coverage.stopJSCoverage(), - * page.coverage.stopCSSCoverage(), - * ]); - * let totalBytes = 0; - * let usedBytes = 0; - * const coverage = [...jsCoverage, ...cssCoverage]; - * for (const entry of coverage) { - * totalBytes += entry.text.length; - * for (const range of entry.ranges) - * usedBytes += range.end - range.start - 1; - * } - * console.log(`Bytes used: ${usedBytes / totalBytes * 100}%`); - * ``` - * @public - */ -export class Coverage { - constructor(client) { - this._jsCoverage = new JSCoverage(client); - this._cssCoverage = new CSSCoverage(client); - } - /** - * @param options - defaults to - * `{ resetOnNavigation : true, reportAnonymousScripts : false }` - * @returns Promise that resolves when coverage is started. - * - * @remarks - * Anonymous scripts are ones that don't have an associated url. These are - * scripts that are dynamically created on the page using `eval` or - * `new Function`. If `reportAnonymousScripts` is set to `true`, anonymous - * scripts will have `__puppeteer_evaluation_script__` as their URL. - */ - async startJSCoverage(options = {}) { - return await this._jsCoverage.start(options); - } - /** - * @returns Promise that resolves to the array of coverage reports for - * all scripts. - * - * @remarks - * JavaScript Coverage doesn't include anonymous scripts by default. - * However, scripts with sourceURLs are reported. - */ - async stopJSCoverage() { - return await this._jsCoverage.stop(); - } - /** - * @param options - defaults to `{ resetOnNavigation : true }` - * @returns Promise that resolves when coverage is started. - */ - async startCSSCoverage(options = {}) { - return await this._cssCoverage.start(options); - } - /** - * @returns Promise that resolves to the array of coverage reports - * for all stylesheets. - * @remarks - * CSS Coverage doesn't include dynamically injected style tags - * without sourceURLs. - */ - async stopCSSCoverage() { - return await this._cssCoverage.stop(); - } -} -/** - * @public - */ -export class JSCoverage { - constructor(client) { - this._enabled = false; - this._scriptURLs = new Map(); - this._scriptSources = new Map(); - this._eventListeners = []; - this._resetOnNavigation = false; - this._reportAnonymousScripts = false; - this._client = client; - } - async start(options = {}) { - assert(!this._enabled, "JSCoverage is already enabled"); - const { resetOnNavigation = true, reportAnonymousScripts = false } = - options; - this._resetOnNavigation = resetOnNavigation; - this._reportAnonymousScripts = reportAnonymousScripts; - this._enabled = true; - this._scriptURLs.clear(); - this._scriptSources.clear(); - this._eventListeners = [ - helper.addEventListener( - this._client, - "Debugger.scriptParsed", - this._onScriptParsed.bind(this), - ), - helper.addEventListener( - this._client, - "Runtime.executionContextsCleared", - this._onExecutionContextsCleared.bind(this), - ), - ]; - await Promise.all([ - this._client.send("Profiler.enable"), - this._client.send("Profiler.startPreciseCoverage", { - callCount: false, - detailed: true, - }), - this._client.send("Debugger.enable"), - this._client.send("Debugger.setSkipAllPauses", { skip: true }), - ]); - } - _onExecutionContextsCleared() { - if (!this._resetOnNavigation) { - return; - } - this._scriptURLs.clear(); - this._scriptSources.clear(); - } - async _onScriptParsed(event) { - // Ignore puppeteer-injected scripts - if (event.url === EVALUATION_SCRIPT_URL) { - return; - } - // Ignore other anonymous scripts unless the reportAnonymousScripts option is true. - if (!event.url && !this._reportAnonymousScripts) { - return; - } - try { - const response = await this._client.send("Debugger.getScriptSource", { - scriptId: event.scriptId, - }); - this._scriptURLs.set(event.scriptId, event.url); - this._scriptSources.set(event.scriptId, response.scriptSource); - } catch (error) { - // This might happen if the page has already navigated away. - debugError(error); - } - } - async stop() { - assert(this._enabled, "JSCoverage is not enabled"); - this._enabled = false; - const result = await Promise.all([ - this._client.send("Profiler.takePreciseCoverage"), - this._client.send("Profiler.stopPreciseCoverage"), - this._client.send("Profiler.disable"), - this._client.send("Debugger.disable"), - ]); - helper.removeEventListeners(this._eventListeners); - const coverage = []; - const profileResponse = result[0]; - for (const entry of profileResponse.result) { - let url = this._scriptURLs.get(entry.scriptId); - if (!url && this._reportAnonymousScripts) { - url = "debugger://VM" + entry.scriptId; - } - const text = this._scriptSources.get(entry.scriptId); - if (text === undefined || url === undefined) { - continue; - } - const flattenRanges = []; - for (const func of entry.functions) { - flattenRanges.push(...func.ranges); - } - const ranges = convertToDisjointRanges(flattenRanges); - coverage.push({ url, ranges, text }); - } - return coverage; - } -} -/** - * @public - */ -export class CSSCoverage { - constructor(client) { - this._enabled = false; - this._stylesheetURLs = new Map(); - this._stylesheetSources = new Map(); - this._eventListeners = []; - this._resetOnNavigation = false; - this._reportAnonymousScripts = false; - this._client = client; - } - async start(options = {}) { - assert(!this._enabled, "CSSCoverage is already enabled"); - const { resetOnNavigation = true } = options; - this._resetOnNavigation = resetOnNavigation; - this._enabled = true; - this._stylesheetURLs.clear(); - this._stylesheetSources.clear(); - this._eventListeners = [ - helper.addEventListener( - this._client, - "CSS.styleSheetAdded", - this._onStyleSheet.bind(this), - ), - helper.addEventListener( - this._client, - "Runtime.executionContextsCleared", - this._onExecutionContextsCleared.bind(this), - ), - ]; - await Promise.all([ - this._client.send("DOM.enable"), - this._client.send("CSS.enable"), - this._client.send("CSS.startRuleUsageTracking"), - ]); - } - _onExecutionContextsCleared() { - if (!this._resetOnNavigation) { - return; - } - this._stylesheetURLs.clear(); - this._stylesheetSources.clear(); - } - async _onStyleSheet(event) { - const header = event.header; - // Ignore anonymous scripts - if (!header.sourceURL) { - return; - } - try { - const response = await this._client.send("CSS.getStyleSheetText", { - styleSheetId: header.styleSheetId, - }); - this._stylesheetURLs.set(header.styleSheetId, header.sourceURL); - this._stylesheetSources.set(header.styleSheetId, response.text); - } catch (error) { - // This might happen if the page has already navigated away. - debugError(error); - } - } - async stop() { - assert(this._enabled, "CSSCoverage is not enabled"); - this._enabled = false; - const ruleTrackingResponse = await this._client.send( - "CSS.stopRuleUsageTracking", - ); - await Promise.all([ - this._client.send("CSS.disable"), - this._client.send("DOM.disable"), - ]); - helper.removeEventListeners(this._eventListeners); - // aggregate by styleSheetId - const styleSheetIdToCoverage = new Map(); - for (const entry of ruleTrackingResponse.ruleUsage) { - let ranges = styleSheetIdToCoverage.get(entry.styleSheetId); - if (!ranges) { - ranges = []; - styleSheetIdToCoverage.set(entry.styleSheetId, ranges); - } - ranges.push({ - startOffset: entry.startOffset, - endOffset: entry.endOffset, - count: entry.used ? 1 : 0, - }); - } - const coverage = []; - for (const styleSheetId of this._stylesheetURLs.keys()) { - const url = this._stylesheetURLs.get(styleSheetId); - const text = this._stylesheetSources.get(styleSheetId); - const ranges = convertToDisjointRanges( - styleSheetIdToCoverage.get(styleSheetId) || [], - ); - coverage.push({ url, ranges, text }); - } - return coverage; - } -} -function convertToDisjointRanges(nestedRanges) { - const points = []; - for (const range of nestedRanges) { - points.push({ offset: range.startOffset, type: 0, range }); - points.push({ offset: range.endOffset, type: 1, range }); - } - // Sort points to form a valid parenthesis sequence. - points.sort((a, b) => { - // Sort with increasing offsets. - if (a.offset !== b.offset) { - return a.offset - b.offset; - } - // All "end" points should go before "start" points. - if (a.type !== b.type) { - return b.type - a.type; - } - const aLength = a.range.endOffset - a.range.startOffset; - const bLength = b.range.endOffset - b.range.startOffset; - // For two "start" points, the one with longer range goes first. - if (a.type === 0) { - return bLength - aLength; - } - // For two "end" points, the one with shorter range goes first. - return aLength - bLength; - }); - const hitCountStack = []; - const results = []; - let lastOffset = 0; - // Run scanning line to intersect all ranges. - for (const point of points) { - if ( - hitCountStack.length && - lastOffset < point.offset && - hitCountStack[hitCountStack.length - 1] > 0 - ) { - const lastResult = results.length ? results[results.length - 1] : null; - if (lastResult && lastResult.end === lastOffset) { - lastResult.end = point.offset; - } else { - results.push({ start: lastOffset, end: point.offset }); - } - } - lastOffset = point.offset; - if (point.type === 0) { - hitCountStack.push(point.range.count); - } else { - hitCountStack.pop(); - } - } - // Filter out empty ranges. - return results.filter((range) => range.end - range.start > 1); -} -//# sourceMappingURL=Coverage.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/DOMWorld.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/DOMWorld.d.ts deleted file mode 100644 index 45d328179e7..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/DOMWorld.d.ts +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Copyright 2019 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { PuppeteerLifeCycleEvent } from "./LifecycleWatcher.js"; -import { ElementHandle, JSHandle } from "./JSHandle.js"; -import { ExecutionContext } from "./ExecutionContext.js"; -import { TimeoutSettings } from "./TimeoutSettings.js"; -import { MouseButton } from "./Input.js"; -import { Frame, FrameManager } from "./FrameManager.js"; -import { - EvaluateFn, - EvaluateFnReturnType, - EvaluateHandleFn, - SerializableOrJSHandle, - UnwrapPromiseLike, - WrapElementHandle, -} from "./EvalTypes.js"; -/** - * @public - */ -export interface WaitForSelectorOptions { - visible?: boolean; - hidden?: boolean; - timeout?: number; -} -/** - * @internal - */ -export interface PageBinding { - name: string; - pptrFunction: Function; -} -/** - * @internal - */ -export declare class DOMWorld { - private _frameManager; - private _frame; - private _timeoutSettings; - private _documentPromise?; - private _contextPromise?; - private _contextResolveCallback?; - private _detached; - /** - * @internal - */ - _waitTasks: Set; - /** - * @internal - * Contains mapping from functions that should be bound to Puppeteer functions. - */ - _boundFunctions: Map; - private _ctxBindings; - private static bindingIdentifier; - constructor( - frameManager: FrameManager, - frame: Frame, - timeoutSettings: TimeoutSettings, - ); - frame(): Frame; - _setContext(context?: ExecutionContext): Promise; - _hasContext(): boolean; - _detach(): void; - executionContext(): Promise; - evaluateHandle( - pageFunction: EvaluateHandleFn, - ...args: SerializableOrJSHandle[] - ): Promise; - evaluate( - pageFunction: T, - ...args: SerializableOrJSHandle[] - ): Promise>>; - $(selector: string): Promise | null>; - _document(): Promise; - $x(expression: string): Promise; - $eval( - selector: string, - pageFunction: ( - element: any, - ...args: unknown[] - ) => ReturnType | Promise, - ...args: SerializableOrJSHandle[] - ): Promise>; - $$eval( - selector: string, - pageFunction: ( - elements: any[], - ...args: unknown[] - ) => ReturnType | Promise, - ...args: SerializableOrJSHandle[] - ): Promise>; - $$(selector: string): Promise>>; - content(): Promise; - setContent(html: string, options?: { - timeout?: number; - waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[]; - }): Promise; - /** - * Adds a script tag into the current context. - * - * @remarks - * - * You can pass a URL, filepath or string of contents. Note that when running Puppeteer - * in a browser environment you cannot pass a filepath and should use either - * `url` or `content`. - */ - addScriptTag(options: { - url?: string; - path?: string; - content?: string; - type?: string; - }): Promise; - /** - * Adds a style tag into the current context. - * - * @remarks - * - * You can pass a URL, filepath or string of contents. Note that when running Puppeteer - * in a browser environment you cannot pass a filepath and should use either - * `url` or `content`. - * - */ - addStyleTag(options: { - url?: string; - path?: string; - content?: string; - }): Promise; - click(selector: string, options: { - delay?: number; - button?: MouseButton; - clickCount?: number; - }): Promise; - focus(selector: string): Promise; - hover(selector: string): Promise; - select(selector: string, ...values: string[]): Promise; - tap(selector: string): Promise; - type(selector: string, text: string, options?: { - delay: number; - }): Promise; - waitForSelector( - selector: string, - options: WaitForSelectorOptions, - ): Promise; - private _settingUpBinding; - /** - * @internal - */ - addBindingToContext(context: ExecutionContext, name: string): Promise; - private _onBindingCalled; - /** - * @internal - */ - waitForSelectorInPage( - queryOne: Function, - selector: string, - options: WaitForSelectorOptions, - binding?: PageBinding, - ): Promise; - waitForXPath( - xpath: string, - options: WaitForSelectorOptions, - ): Promise; - waitForFunction(pageFunction: Function | string, options?: { - polling?: string | number; - timeout?: number; - }, ...args: SerializableOrJSHandle[]): Promise; - title(): Promise; -} -/** - * @internal - */ -export interface WaitTaskOptions { - domWorld: DOMWorld; - predicateBody: Function | string; - title: string; - polling: string | number; - timeout: number; - binding?: PageBinding; - args: SerializableOrJSHandle[]; -} -/** - * @internal - */ -export declare class WaitTask { - _domWorld: DOMWorld; - _polling: string | number; - _timeout: number; - _predicateBody: string; - _args: SerializableOrJSHandle[]; - _binding: PageBinding; - _runCount: number; - promise: Promise; - _resolve: (x: JSHandle) => void; - _reject: (x: Error) => void; - _timeoutTimer?: number; - _terminated: boolean; - constructor(options: WaitTaskOptions); - terminate(error: Error): void; - rerun(): Promise; - _cleanup(): void; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/DOMWorld.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/DOMWorld.js deleted file mode 100644 index 33751c3b34b..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/DOMWorld.js +++ /dev/null @@ -1,751 +0,0 @@ -/// -/** - * Copyright 2019 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { assert } from "./assert.js"; -import { debugError, helper } from "./helper.js"; -import { LifecycleWatcher } from "./LifecycleWatcher.js"; -import { TimeoutError } from "./Errors.js"; -import { getQueryHandlerAndSelector } from "./QueryHandler.js"; -/** - * @internal - */ -export class DOMWorld { - constructor(frameManager, frame, timeoutSettings) { - this._documentPromise = null; - this._contextPromise = null; - this._contextResolveCallback = null; - this._detached = false; - /** - * @internal - */ - this._waitTasks = new Set(); - /** - * @internal - * Contains mapping from functions that should be bound to Puppeteer functions. - */ - this._boundFunctions = new Map(); - // Set of bindings that have been registered in the current context. - this._ctxBindings = new Set(); - // If multiple waitFor are set up asynchronously, we need to wait for the - // first one to set up the binding in the page before running the others. - this._settingUpBinding = null; - this._frameManager = frameManager; - this._frame = frame; - this._timeoutSettings = timeoutSettings; - this._setContext(null); - frameManager._client.on( - "Runtime.bindingCalled", - (event) => this._onBindingCalled(event), - ); - } - frame() { - return this._frame; - } - async _setContext(context) { - if (context) { - this._ctxBindings.clear(); - this._contextResolveCallback.call(null, context); - this._contextResolveCallback = null; - for (const waitTask of this._waitTasks) { - waitTask.rerun(); - } - } else { - this._documentPromise = null; - this._contextPromise = new Promise((fulfill) => { - this._contextResolveCallback = fulfill; - }); - } - } - _hasContext() { - return !this._contextResolveCallback; - } - _detach() { - this._detached = true; - for (const waitTask of this._waitTasks) { - waitTask.terminate( - new Error("waitForFunction failed: frame got detached."), - ); - } - } - executionContext() { - if (this._detached) { - throw new Error( - `Execution context is not available in detached frame "${this._frame.url()}" (are you trying to evaluate?)`, - ); - } - return this._contextPromise; - } - async evaluateHandle(pageFunction, ...args) { - const context = await this.executionContext(); - return context.evaluateHandle(pageFunction, ...args); - } - async evaluate(pageFunction, ...args) { - const context = await this.executionContext(); - return context.evaluate(pageFunction, ...args); - } - async $(selector) { - const document = await this._document(); - const value = await document.$(selector); - return value; - } - async _document() { - if (this._documentPromise) { - return this._documentPromise; - } - this._documentPromise = this.executionContext().then(async (context) => { - const document = await context.evaluateHandle("document"); - return document.asElement(); - }); - return this._documentPromise; - } - async $x(expression) { - const document = await this._document(); - const value = await document.$x(expression); - return value; - } - async $eval(selector, pageFunction, ...args) { - const document = await this._document(); - return document.$eval(selector, pageFunction, ...args); - } - async $$eval(selector, pageFunction, ...args) { - const document = await this._document(); - const value = await document.$$eval(selector, pageFunction, ...args); - return value; - } - async $$(selector) { - const document = await this._document(); - const value = await document.$$(selector); - return value; - } - async content() { - return await this.evaluate(() => { - let retVal = ""; - if (document.doctype) { - retVal = new XMLSerializer().serializeToString(document.doctype); - } - if (document.documentElement) { - retVal += document.documentElement.outerHTML; - } - return retVal; - }); - } - async setContent(html, options = {}) { - const { - waitUntil = ["load"], - timeout = this._timeoutSettings.navigationTimeout(), - } = options; - // We rely upon the fact that document.open() will reset frame lifecycle with "init" - // lifecycle event. @see https://crrev.com/608658 - await this.evaluate((html) => { - document.open(); - document.write(html); - document.close(); - }, html); - const watcher = new LifecycleWatcher( - this._frameManager, - this._frame, - waitUntil, - timeout, - ); - const error = await Promise.race([ - watcher.timeoutOrTerminationPromise(), - watcher.lifecyclePromise(), - ]); - watcher.dispose(); - if (error) { - throw error; - } - } - /** - * Adds a script tag into the current context. - * - * @remarks - * - * You can pass a URL, filepath or string of contents. Note that when running Puppeteer - * in a browser environment you cannot pass a filepath and should use either - * `url` or `content`. - */ - async addScriptTag(options) { - const { url = null, path = null, content = null, type = "" } = options; - if (url !== null) { - try { - const context = await this.executionContext(); - return (await context.evaluateHandle(addScriptUrl, url, type)) - .asElement(); - } catch (error) { - throw new Error(`Loading script from ${url} failed`); - } - } - if (path !== null) { - let contents = await Deno.readTextFile(path); - contents += "//# sourceURL=" + path.replace(/\n/g, ""); - const context = await this.executionContext(); - return (await context.evaluateHandle(addScriptContent, contents, type)) - .asElement(); - } - if (content !== null) { - const context = await this.executionContext(); - return (await context.evaluateHandle(addScriptContent, content, type)) - .asElement(); - } - throw new Error( - "Provide an object with a `url`, `path` or `content` property", - ); - async function addScriptUrl(url, type) { - const script = document.createElement("script"); - script.src = url; - if (type) { - script.type = type; - } - const promise = new Promise((res, rej) => { - script.onload = res; - script.onerror = rej; - }); - document.head.appendChild(script); - await promise; - return script; - } - function addScriptContent(content, type = "text/javascript") { - const script = document.createElement("script"); - script.type = type; - script.text = content; - let error = null; - script.onerror = (e) => (error = e); - document.head.appendChild(script); - if (error) { - throw error; - } - return script; - } - } - /** - * Adds a style tag into the current context. - * - * @remarks - * - * You can pass a URL, filepath or string of contents. Note that when running Puppeteer - * in a browser environment you cannot pass a filepath and should use either - * `url` or `content`. - * - */ - async addStyleTag(options) { - const { url = null, path = null, content = null } = options; - if (url !== null) { - try { - const context = await this.executionContext(); - return (await context.evaluateHandle(addStyleUrl, url)).asElement(); - } catch (error) { - throw new Error(`Loading style from ${url} failed`); - } - } - if (path !== null) { - let contents = await Deno.readTextFile(path); - contents += "/*# sourceURL=" + path.replace(/\n/g, "") + "*/"; - const context = await this.executionContext(); - return (await context.evaluateHandle(addStyleContent, contents)) - .asElement(); - } - if (content !== null) { - const context = await this.executionContext(); - return (await context.evaluateHandle(addStyleContent, content)) - .asElement(); - } - throw new Error( - "Provide an object with a `url`, `path` or `content` property", - ); - async function addStyleUrl(url) { - const link = document.createElement("link"); - link.rel = "stylesheet"; - link.href = url; - const promise = new Promise((res, rej) => { - link.onload = res; - link.onerror = rej; - }); - document.head.appendChild(link); - await promise; - return link; - } - async function addStyleContent(content) { - const style = document.createElement("style"); - style.type = "text/css"; - style.appendChild(document.createTextNode(content)); - const promise = new Promise((res, rej) => { - style.onload = res; - style.onerror = rej; - }); - document.head.appendChild(style); - await promise; - return style; - } - } - async click(selector, options) { - const handle = await this.$(selector); - assert(handle, "No node found for selector: " + selector); - await handle.click(options); - await handle.dispose(); - } - async focus(selector) { - const handle = await this.$(selector); - assert(handle, "No node found for selector: " + selector); - await handle.focus(); - await handle.dispose(); - } - async hover(selector) { - const handle = await this.$(selector); - assert(handle, "No node found for selector: " + selector); - await handle.hover(); - await handle.dispose(); - } - async select(selector, ...values) { - const handle = await this.$(selector); - assert(handle, "No node found for selector: " + selector); - const result = await handle.select(...values); - await handle.dispose(); - return result; - } - async tap(selector) { - const handle = await this.$(selector); - await handle.tap(); - await handle.dispose(); - } - async type(selector, text, options) { - const handle = await this.$(selector); - assert(handle, "No node found for selector: " + selector); - await handle.type(text, options); - await handle.dispose(); - } - async waitForSelector(selector, options) { - const { updatedSelector, queryHandler } = getQueryHandlerAndSelector( - selector, - ); - return queryHandler.waitFor(this, updatedSelector, options); - } - /** - * @internal - */ - async addBindingToContext(context, name) { - // Previous operation added the binding so we are done. - if ( - this._ctxBindings.has( - DOMWorld.bindingIdentifier(name, context._contextId), - ) - ) { - return; - } - // Wait for other operation to finish - if (this._settingUpBinding) { - await this._settingUpBinding; - return this.addBindingToContext(context, name); - } - const bind = async (name) => { - const expression = helper.pageBindingInitString("internal", name); - try { - // TODO: In theory, it would be enough to call this just once - await context._client.send("Runtime.addBinding", { - name, - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore The protocol definition is not up to date. - executionContextName: context._contextName, - }); - await context.evaluate(expression); - } catch (error) { - // We could have tried to evaluate in a context which was already - // destroyed. This happens, for example, if the page is navigated while - // we are trying to add the binding - const ctxDestroyed = error.message.includes( - "Execution context was destroyed", - ); - const ctxNotFound = error.message.includes( - "Cannot find context with specified id", - ); - if (ctxDestroyed || ctxNotFound) { - return; - } else { - debugError(error); - return; - } - } - this._ctxBindings.add( - DOMWorld.bindingIdentifier(name, context._contextId), - ); - }; - this._settingUpBinding = bind(name); - await this._settingUpBinding; - this._settingUpBinding = null; - } - async _onBindingCalled(event) { - let payload; - if (!this._hasContext()) { - return; - } - const context = await this.executionContext(); - try { - payload = JSON.parse(event.payload); - } catch { - // The binding was either called by something in the page or it was - // called before our wrapper was initialized. - return; - } - const { type, name, seq, args } = payload; - if ( - type !== "internal" || - !this._ctxBindings.has( - DOMWorld.bindingIdentifier(name, context._contextId), - ) - ) { - return; - } - if (context._contextId !== event.executionContextId) { - return; - } - try { - const result = await this._boundFunctions.get(name)(...args); - await context.evaluate(deliverResult, name, seq, result); - } catch (error) { - // The WaitTask may already have been resolved by timing out, or the - // exection context may have been destroyed. - // In both caes, the promises above are rejected with a protocol error. - // We can safely ignores these, as the WaitTask is re-installed in - // the next execution context if needed. - if (error.message.includes("Protocol error")) { - return; - } - debugError(error); - } - function deliverResult(name, seq, result) { - globalThis[name].callbacks.get(seq).resolve(result); - globalThis[name].callbacks.delete(seq); - } - } - /** - * @internal - */ - async waitForSelectorInPage(queryOne, selector, options, binding) { - const { - visible: waitForVisible = false, - hidden: waitForHidden = false, - timeout = this._timeoutSettings.timeout(), - } = options; - const polling = waitForVisible || waitForHidden ? "raf" : "mutation"; - const title = `selector \`${selector}\`${ - waitForHidden ? " to be hidden" : "" - }`; - async function predicate(selector, waitForVisible, waitForHidden) { - const node = predicateQueryHandler - ? (await predicateQueryHandler(document, selector)) - : document.querySelector(selector); - return checkWaitForOptions(node, waitForVisible, waitForHidden); - } - const waitTaskOptions = { - domWorld: this, - predicateBody: helper.makePredicateString(predicate, queryOne), - title, - polling, - timeout, - args: [selector, waitForVisible, waitForHidden], - binding, - }; - const waitTask = new WaitTask(waitTaskOptions); - const jsHandle = await waitTask.promise; - const elementHandle = jsHandle.asElement(); - if (!elementHandle) { - await jsHandle.dispose(); - return null; - } - return elementHandle; - } - async waitForXPath(xpath, options) { - const { - visible: waitForVisible = false, - hidden: waitForHidden = false, - timeout = this._timeoutSettings.timeout(), - } = options; - const polling = waitForVisible || waitForHidden ? "raf" : "mutation"; - const title = `XPath \`${xpath}\`${waitForHidden ? " to be hidden" : ""}`; - function predicate(xpath, waitForVisible, waitForHidden) { - const node = - document.evaluate( - xpath, - document, - null, - XPathResult.FIRST_ORDERED_NODE_TYPE, - null, - ).singleNodeValue; - return checkWaitForOptions(node, waitForVisible, waitForHidden); - } - const waitTaskOptions = { - domWorld: this, - predicateBody: helper.makePredicateString(predicate), - title, - polling, - timeout, - args: [xpath, waitForVisible, waitForHidden], - }; - const waitTask = new WaitTask(waitTaskOptions); - const jsHandle = await waitTask.promise; - const elementHandle = jsHandle.asElement(); - if (!elementHandle) { - await jsHandle.dispose(); - return null; - } - return elementHandle; - } - waitForFunction(pageFunction, options = {}, ...args) { - const { polling = "raf", timeout = this._timeoutSettings.timeout() } = - options; - const waitTaskOptions = { - domWorld: this, - predicateBody: pageFunction, - title: "function", - polling, - timeout, - args, - }; - const waitTask = new WaitTask(waitTaskOptions); - return waitTask.promise; - } - async title() { - return this.evaluate(() => document.title); - } -} -DOMWorld.bindingIdentifier = (name, contextId) => `${name}_${contextId}`; -/** - * @internal - */ -export class WaitTask { - constructor(options) { - this._runCount = 0; - this._terminated = false; - if (helper.isString(options.polling)) { - assert( - options.polling === "raf" || options.polling === "mutation", - "Unknown polling option: " + options.polling, - ); - } else if (helper.isNumber(options.polling)) { - assert( - options.polling > 0, - "Cannot poll with non-positive interval: " + options.polling, - ); - } else { - throw new Error("Unknown polling options: " + options.polling); - } - function getPredicateBody(predicateBody) { - if (helper.isString(predicateBody)) { - return `return (${predicateBody});`; - } - return `return (${predicateBody})(...args);`; - } - this._domWorld = options.domWorld; - this._polling = options.polling; - this._timeout = options.timeout; - this._predicateBody = getPredicateBody(options.predicateBody); - this._args = options.args; - this._binding = options.binding; - this._runCount = 0; - this._domWorld._waitTasks.add(this); - if (this._binding) { - this._domWorld._boundFunctions.set( - this._binding.name, - this._binding.pptrFunction, - ); - } - this.promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - }); - // Since page navigation requires us to re-install the pageScript, we should track - // timeout on our end. - if (options.timeout) { - const timeoutError = new TimeoutError( - `waiting for ${options.title} failed: timeout ${options.timeout}ms exceeded`, - ); - this._timeoutTimer = setTimeout( - () => this.terminate(timeoutError), - options.timeout, - ); - } - this.rerun(); - } - terminate(error) { - this._terminated = true; - this._reject(error); - this._cleanup(); - } - async rerun() { - const runCount = ++this._runCount; - let success = null; - let error = null; - const context = await this._domWorld.executionContext(); - if (this._terminated || runCount !== this._runCount) { - return; - } - if (this._binding) { - await this._domWorld.addBindingToContext(context, this._binding.name); - } - if (this._terminated || runCount !== this._runCount) { - return; - } - try { - success = await context.evaluateHandle( - waitForPredicatePageFunction, - this._predicateBody, - this._polling, - this._timeout, - ...this._args, - ); - } catch (error_) { - error = error_; - } - if (this._terminated || runCount !== this._runCount) { - if (success) { - await success.dispose(); - } - return; - } - // Ignore timeouts in pageScript - we track timeouts ourselves. - // If the frame's execution context has already changed, `frame.evaluate` will - // throw an error - ignore this predicate run altogether. - if ( - !error && - (await this._domWorld.evaluate((s) => !s, success).catch(() => true)) - ) { - await success.dispose(); - return; - } - if (error) { - if (error.message.includes("TypeError: binding is not a function")) { - return this.rerun(); - } - // When frame is detached the task should have been terminated by the DOMWorld. - // This can fail if we were adding this task while the frame was detached, - // so we terminate here instead. - if ( - error.message.includes( - "Execution context is not available in detached frame", - ) - ) { - this.terminate( - new Error("waitForFunction failed: frame got detached."), - ); - return; - } - // When the page is navigated, the promise is rejected. - // We will try again in the new execution context. - if (error.message.includes("Execution context was destroyed")) { - return; - } - // We could have tried to evaluate in a context which was already - // destroyed. - if (error.message.includes("Cannot find context with specified id")) { - return; - } - this._reject(error); - } else { - this._resolve(success); - } - this._cleanup(); - } - _cleanup() { - clearTimeout(this._timeoutTimer); - this._domWorld._waitTasks.delete(this); - } -} -async function waitForPredicatePageFunction( - predicateBody, - polling, - timeout, - ...args -) { - const predicate = new Function("...args", predicateBody); - let timedOut = false; - if (timeout) { - setTimeout(() => (timedOut = true), timeout); - } - if (polling === "raf") { - return await pollRaf(); - } - if (polling === "mutation") { - return await pollMutation(); - } - if (typeof polling === "number") { - return await pollInterval(polling); - } - /** - * @returns {!Promise<*>} - */ - async function pollMutation() { - const success = await predicate(...args); - if (success) { - return Promise.resolve(success); - } - let fulfill; - const result = new Promise((x) => (fulfill = x)); - const observer = new MutationObserver(async () => { - if (timedOut) { - observer.disconnect(); - fulfill(); - } - const success = await predicate(...args); - if (success) { - observer.disconnect(); - fulfill(success); - } - }); - observer.observe(document, { - childList: true, - subtree: true, - attributes: true, - }); - return result; - } - async function pollRaf() { - let fulfill; - const result = new Promise((x) => (fulfill = x)); - await onRaf(); - return result; - async function onRaf() { - if (timedOut) { - fulfill(); - return; - } - const success = await predicate(...args); - if (success) { - fulfill(success); - } else { - requestAnimationFrame(onRaf); - } - } - } - async function pollInterval(pollInterval) { - let fulfill; - const result = new Promise((x) => (fulfill = x)); - await onTimeout(); - return result; - async function onTimeout() { - if (timedOut) { - fulfill(); - return; - } - const success = await predicate(...args); - if (success) { - fulfill(success); - } else { - setTimeout(onTimeout, pollInterval); - } - } - } -} -//# sourceMappingURL=DOMWorld.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Debug.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Debug.d.ts deleted file mode 100644 index 5e0c61c207f..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Debug.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * A debug function that can be used in any environment. - * - * @remarks - * - * If used in Node, it falls back to the - * {@link https://www.npmjs.com/package/debug | debug module}. In the browser it - * uses `console.log`. - * - * @param prefix - this will be prefixed to each log. - * @returns a function that can be called to log to that debug channel. - * - * In Node, use the `DEBUG` environment variable to control logging: - * - * ``` - * DEBUG=* // logs all channels - * DEBUG=foo // logs the `foo` channel - * DEBUG=foo* // logs any channels starting with `foo` - * ``` - * - * In the browser, set `window.__PUPPETEER_DEBUG` to a string: - * - * ``` - * window.__PUPPETEER_DEBUG='*'; // logs all channels - * window.__PUPPETEER_DEBUG='foo'; // logs the `foo` channel - * window.__PUPPETEER_DEBUG='foo*'; // logs any channels starting with `foo` - * ``` - * - * @example - * ``` - * const log = debug('Page'); - * - * log('new page created') - * // logs "Page: new page created" - * ``` - */ -export declare const debug: (prefix: string) => (...args: unknown[]) => void; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Debug.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Debug.js deleted file mode 100644 index 19e6b2453c0..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Debug.js +++ /dev/null @@ -1,76 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * A debug function that can be used in any environment. - * - * @remarks - * - * If used in Node, it falls back to the - * {@link https://www.npmjs.com/package/debug | debug module}. In the browser it - * uses `console.log`. - * - * @param prefix - this will be prefixed to each log. - * @returns a function that can be called to log to that debug channel. - * - * In Node, use the `DEBUG` environment variable to control logging: - * - * ``` - * DEBUG=* // logs all channels - * DEBUG=foo // logs the `foo` channel - * DEBUG=foo* // logs any channels starting with `foo` - * ``` - * - * In the browser, set `window.__PUPPETEER_DEBUG` to a string: - * - * ``` - * window.__PUPPETEER_DEBUG='*'; // logs all channels - * window.__PUPPETEER_DEBUG='foo'; // logs the `foo` channel - * window.__PUPPETEER_DEBUG='foo*'; // logs any channels starting with `foo` - * ``` - * - * @example - * ``` - * const log = debug('Page'); - * - * log('new page created') - * // logs "Page: new page created" - * ``` - */ -export const debug = (prefix) => { - return (...logArgs) => { - const debugLevel = globalThis.__PUPPETEER_DEBUG; - if (!debugLevel) { - return; - } - const everythingShouldBeLogged = debugLevel === "*"; - const prefixMatchesDebugLevel = everythingShouldBeLogged || - /** - * If the debug level is `foo*`, that means we match any prefix that - * starts with `foo`. If the level is `foo`, we match only the prefix - * `foo`. - */ - (debugLevel.endsWith("*") - ? prefix.startsWith(debugLevel) - : prefix === debugLevel); - if (!prefixMatchesDebugLevel) { - return; - } - // eslint-disable-next-line no-console - console.log(`${prefix}:`, ...logArgs); - }; -}; -//# sourceMappingURL=Debug.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/DeviceDescriptors.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/DeviceDescriptors.d.ts deleted file mode 100644 index 1949482f9a6..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/DeviceDescriptors.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @public - */ -export interface Device { - name: string; - userAgent: string; - viewport: { - width: number; - height: number; - deviceScaleFactor: number; - isMobile: boolean; - hasTouch: boolean; - isLandscape: boolean; - }; -} -/** - * @public - */ -export declare type DevicesMap = { - [name: string]: Device; -}; -/** - * @internal - */ -export declare const devicesMap: DevicesMap; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/DeviceDescriptors.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/DeviceDescriptors.js deleted file mode 100644 index 756b2727f74..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/DeviceDescriptors.js +++ /dev/null @@ -1,1027 +0,0 @@ -/// -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const devices = [ - { - name: "Blackberry PlayBook", - userAgent: - "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+", - viewport: { - width: 600, - height: 1024, - deviceScaleFactor: 1, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Blackberry PlayBook landscape", - userAgent: - "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+", - viewport: { - width: 1024, - height: 600, - deviceScaleFactor: 1, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "BlackBerry Z30", - userAgent: - "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+", - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "BlackBerry Z30 landscape", - userAgent: - "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+", - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Galaxy Note 3", - userAgent: - "Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Galaxy Note 3 landscape", - userAgent: - "Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Galaxy Note II", - userAgent: - "Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Galaxy Note II landscape", - userAgent: - "Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Galaxy S III", - userAgent: - "Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Galaxy S III landscape", - userAgent: - "Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Galaxy S5", - userAgent: - "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Galaxy S5 landscape", - userAgent: - "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPad", - userAgent: - "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1", - viewport: { - width: 768, - height: 1024, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPad landscape", - userAgent: - "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1", - viewport: { - width: 1024, - height: 768, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPad Mini", - userAgent: - "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1", - viewport: { - width: 768, - height: 1024, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPad Mini landscape", - userAgent: - "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1", - viewport: { - width: 1024, - height: 768, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPad Pro", - userAgent: - "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1", - viewport: { - width: 1024, - height: 1366, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPad Pro landscape", - userAgent: - "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1", - viewport: { - width: 1366, - height: 1024, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPhone 4", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53", - viewport: { - width: 320, - height: 480, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPhone 4 landscape", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53", - viewport: { - width: 480, - height: 320, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPhone 5", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1", - viewport: { - width: 320, - height: 568, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPhone 5 landscape", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1", - viewport: { - width: 568, - height: 320, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPhone 6", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", - viewport: { - width: 375, - height: 667, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPhone 6 landscape", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", - viewport: { - width: 667, - height: 375, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPhone 6 Plus", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", - viewport: { - width: 414, - height: 736, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPhone 6 Plus landscape", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", - viewport: { - width: 736, - height: 414, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPhone 7", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", - viewport: { - width: 375, - height: 667, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPhone 7 landscape", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", - viewport: { - width: 667, - height: 375, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPhone 7 Plus", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", - viewport: { - width: 414, - height: 736, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPhone 7 Plus landscape", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", - viewport: { - width: 736, - height: 414, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPhone 8", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", - viewport: { - width: 375, - height: 667, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPhone 8 landscape", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", - viewport: { - width: 667, - height: 375, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPhone 8 Plus", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", - viewport: { - width: 414, - height: 736, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPhone 8 Plus landscape", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", - viewport: { - width: 736, - height: 414, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPhone SE", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1", - viewport: { - width: 320, - height: 568, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPhone SE landscape", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1", - viewport: { - width: 568, - height: 320, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPhone X", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", - viewport: { - width: 375, - height: 812, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPhone X landscape", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", - viewport: { - width: 812, - height: 375, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPhone XR", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1", - viewport: { - width: 414, - height: 896, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPhone XR landscape", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1", - viewport: { - width: 896, - height: 414, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPhone 11", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1", - viewport: { - width: 414, - height: 828, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPhone 11 landscape", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1", - viewport: { - width: 828, - height: 414, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPhone 11 Pro", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1", - viewport: { - width: 375, - height: 812, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPhone 11 Pro landscape", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1", - viewport: { - width: 812, - height: 375, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "iPhone 11 Pro Max", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1", - viewport: { - width: 414, - height: 896, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "iPhone 11 Pro Max landscape", - userAgent: - "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1", - viewport: { - width: 896, - height: 414, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "JioPhone 2", - userAgent: - "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5", - viewport: { - width: 240, - height: 320, - deviceScaleFactor: 1, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "JioPhone 2 landscape", - userAgent: - "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5", - viewport: { - width: 320, - height: 240, - deviceScaleFactor: 1, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Kindle Fire HDX", - userAgent: - "Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true", - viewport: { - width: 800, - height: 1280, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Kindle Fire HDX landscape", - userAgent: - "Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true", - viewport: { - width: 1280, - height: 800, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "LG Optimus L70", - userAgent: - "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 384, - height: 640, - deviceScaleFactor: 1.25, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "LG Optimus L70 landscape", - userAgent: - "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 640, - height: 384, - deviceScaleFactor: 1.25, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Microsoft Lumia 550", - userAgent: - "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263", - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Microsoft Lumia 950", - userAgent: - "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263", - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 4, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Microsoft Lumia 950 landscape", - userAgent: - "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263", - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 4, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Nexus 10", - userAgent: - "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36", - viewport: { - width: 800, - height: 1280, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Nexus 10 landscape", - userAgent: - "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36", - viewport: { - width: 1280, - height: 800, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Nexus 4", - userAgent: - "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 384, - height: 640, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Nexus 4 landscape", - userAgent: - "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 640, - height: 384, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Nexus 5", - userAgent: - "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Nexus 5 landscape", - userAgent: - "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Nexus 5X", - userAgent: - "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 412, - height: 732, - deviceScaleFactor: 2.625, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Nexus 5X landscape", - userAgent: - "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 732, - height: 412, - deviceScaleFactor: 2.625, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Nexus 6", - userAgent: - "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 412, - height: 732, - deviceScaleFactor: 3.5, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Nexus 6 landscape", - userAgent: - "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 732, - height: 412, - deviceScaleFactor: 3.5, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Nexus 6P", - userAgent: - "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 412, - height: 732, - deviceScaleFactor: 3.5, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Nexus 6P landscape", - userAgent: - "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 732, - height: 412, - deviceScaleFactor: 3.5, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Nexus 7", - userAgent: - "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36", - viewport: { - width: 600, - height: 960, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Nexus 7 landscape", - userAgent: - "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36", - viewport: { - width: 960, - height: 600, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Nokia Lumia 520", - userAgent: - "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)", - viewport: { - width: 320, - height: 533, - deviceScaleFactor: 1.5, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Nokia Lumia 520 landscape", - userAgent: - "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)", - viewport: { - width: 533, - height: 320, - deviceScaleFactor: 1.5, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Nokia N9", - userAgent: - "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13", - viewport: { - width: 480, - height: 854, - deviceScaleFactor: 1, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Nokia N9 landscape", - userAgent: - "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13", - viewport: { - width: 854, - height: 480, - deviceScaleFactor: 1, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Pixel 2", - userAgent: - "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 411, - height: 731, - deviceScaleFactor: 2.625, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Pixel 2 landscape", - userAgent: - "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 731, - height: 411, - deviceScaleFactor: 2.625, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: "Pixel 2 XL", - userAgent: - "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 411, - height: 823, - deviceScaleFactor: 3.5, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: "Pixel 2 XL landscape", - userAgent: - "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", - viewport: { - width: 823, - height: 411, - deviceScaleFactor: 3.5, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, -]; -/** - * @internal - */ -export const devicesMap = {}; -for (const device of devices) { - devicesMap[device.name] = device; -} -//# sourceMappingURL=DeviceDescriptors.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Dialog.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Dialog.d.ts deleted file mode 100644 index 24f66adac01..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Dialog.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { CDPSession } from "./Connection.js"; -import { Protocol } from "../../vendor/devtools-protocol/types/protocol.d.ts"; -/** - * Dialog instances are dispatched by the {@link Page} via the `dialog` event. - * - * @remarks - * - * @example - * ```js - * const puppeteer = require('puppeteer'); - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * page.on('dialog', async dialog => { - * console.log(dialog.message()); - * await dialog.dismiss(); - * await browser.close(); - * }); - * page.evaluate(() => alert('1')); - * })(); - * ``` - * @public - */ -export declare class Dialog { - private _client; - private _type; - private _message; - private _defaultValue; - private _handled; - /** - * @internal - */ - constructor( - client: CDPSession, - type: Protocol.Page.DialogType, - message: string, - defaultValue?: string, - ); - /** - * @returns The type of the dialog. - */ - type(): Protocol.Page.DialogType; - /** - * @returns The message displayed in the dialog. - */ - message(): string; - /** - * @returns The default value of the prompt, or an empty string if the dialog - * is not a `prompt`. - */ - defaultValue(): string; - /** - * @param promptText - optional text that will be entered in the dialog - * prompt. Has no effect if the dialog's type is not `prompt`. - * - * @returns A promise that resolves when the dialog has been accepted. - */ - accept(promptText?: string): Promise; - /** - * @returns A promise which will resolve once the dialog has been dismissed - */ - dismiss(): Promise; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Dialog.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Dialog.js deleted file mode 100644 index 206ce99cecf..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Dialog.js +++ /dev/null @@ -1,95 +0,0 @@ -/// -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { assert } from "./assert.js"; -/** - * Dialog instances are dispatched by the {@link Page} via the `dialog` event. - * - * @remarks - * - * @example - * ```js - * const puppeteer = require('puppeteer'); - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * page.on('dialog', async dialog => { - * console.log(dialog.message()); - * await dialog.dismiss(); - * await browser.close(); - * }); - * page.evaluate(() => alert('1')); - * })(); - * ``` - * @public - */ -export class Dialog { - /** - * @internal - */ - constructor(client, type, message, defaultValue = "") { - this._handled = false; - this._client = client; - this._type = type; - this._message = message; - this._defaultValue = defaultValue; - } - /** - * @returns The type of the dialog. - */ - type() { - return this._type; - } - /** - * @returns The message displayed in the dialog. - */ - message() { - return this._message; - } - /** - * @returns The default value of the prompt, or an empty string if the dialog - * is not a `prompt`. - */ - defaultValue() { - return this._defaultValue; - } - /** - * @param promptText - optional text that will be entered in the dialog - * prompt. Has no effect if the dialog's type is not `prompt`. - * - * @returns A promise that resolves when the dialog has been accepted. - */ - async accept(promptText) { - assert(!this._handled, "Cannot accept dialog which is already handled!"); - this._handled = true; - await this._client.send("Page.handleJavaScriptDialog", { - accept: true, - promptText: promptText, - }); - } - /** - * @returns A promise which will resolve once the dialog has been dismissed - */ - async dismiss() { - assert(!this._handled, "Cannot dismiss dialog which is already handled!"); - this._handled = true; - await this._client.send("Page.handleJavaScriptDialog", { - accept: false, - }); - } -} -//# sourceMappingURL=Dialog.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EmulationManager.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EmulationManager.d.ts deleted file mode 100644 index 08a6a344f04..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EmulationManager.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { CDPSession } from "./Connection.js"; -import { Viewport } from "./PuppeteerViewport.js"; -export declare class EmulationManager { - _client: CDPSession; - _emulatingMobile: boolean; - _hasTouch: boolean; - constructor(client: CDPSession); - emulateViewport(viewport: Viewport): Promise; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EmulationManager.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EmulationManager.js deleted file mode 100644 index 8cadb7d5395..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EmulationManager.js +++ /dev/null @@ -1,36 +0,0 @@ -/// -export class EmulationManager { - constructor(client) { - this._emulatingMobile = false; - this._hasTouch = false; - this._client = client; - } - async emulateViewport(viewport) { - const mobile = viewport.isMobile || false; - const width = viewport.width; - const height = viewport.height; - const deviceScaleFactor = viewport.deviceScaleFactor || 1; - const screenOrientation = viewport.isLandscape - ? { angle: 90, type: "landscapePrimary" } - : { angle: 0, type: "portraitPrimary" }; - const hasTouch = viewport.hasTouch || false; - await Promise.all([ - this._client.send("Emulation.setDeviceMetricsOverride", { - mobile, - width, - height, - deviceScaleFactor, - screenOrientation, - }), - this._client.send("Emulation.setTouchEmulationEnabled", { - enabled: hasTouch, - }), - ]); - const reloadNeeded = this._emulatingMobile !== mobile || - this._hasTouch !== hasTouch; - this._emulatingMobile = mobile; - this._hasTouch = hasTouch; - return reloadNeeded; - } -} -//# sourceMappingURL=EmulationManager.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Errors.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Errors.d.ts deleted file mode 100644 index 0650c7d865d..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Errors.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright 2018 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @public - */ -export declare class CustomError extends Error { - constructor(message: string); -} -/** - * TimeoutError is emitted whenever certain operations are terminated due to timeout. - * - * @remarks - * - * Example operations are {@link Page.waitForSelector | page.waitForSelector} - * or {@link PuppeteerNode.launch | puppeteer.launch}. - * - * @public - */ -export declare class TimeoutError extends CustomError { -} -/** - * @public - */ -export declare type PuppeteerErrors = Record; -/** - * @public - */ -export declare const puppeteerErrors: PuppeteerErrors; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Errors.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Errors.js deleted file mode 100644 index cb7e1168e58..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Errors.js +++ /dev/null @@ -1,45 +0,0 @@ -/// -/** - * Copyright 2018 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @public - */ -export class CustomError extends Error { - constructor(message) { - super(message); - this.name = this.constructor.name; - Error.captureStackTrace(this, this.constructor); - } -} -/** - * TimeoutError is emitted whenever certain operations are terminated due to timeout. - * - * @remarks - * - * Example operations are {@link Page.waitForSelector | page.waitForSelector} - * or {@link PuppeteerNode.launch | puppeteer.launch}. - * - * @public - */ -export class TimeoutError extends CustomError { -} -/** - * @public - */ -export const puppeteerErrors = { - TimeoutError, -}; -//# sourceMappingURL=Errors.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EvalTypes.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EvalTypes.d.ts deleted file mode 100644 index a54c89af5a4..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EvalTypes.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { ElementHandle, JSHandle } from "./JSHandle.js"; -/** - * @public - */ -export declare type EvaluateFn = - | string - | ((arg1: T, ...args: any[]) => any); -/** - * @public - */ -export declare type UnwrapPromiseLike = T extends PromiseLike ? U - : T; -/** - * @public - */ -export declare type EvaluateFnReturnType = T extends - (...args: any[]) => infer R ? R : any; -/** - * @public - */ -export declare type EvaluateHandleFn = string | ((...args: any[]) => any); -/** - * @public - */ -export declare type Serializable = - | number - | string - | boolean - | null - | BigInt - | JSONArray - | JSONObject; -/** - * @public - */ -export declare type JSONArray = Serializable[]; -/** - * @public - */ -export interface JSONObject { - [key: string]: Serializable; -} -/** - * @public - */ -export declare type SerializableOrJSHandle = Serializable | JSHandle; -/** - * Wraps a DOM element into an ElementHandle instance - * @public - **/ -export declare type WrapElementHandle = X extends any ? ElementHandle : X; -/** - * Unwraps a DOM element out of an ElementHandle instance - * @public - **/ -export declare type UnwrapElementHandle = X extends ElementHandle - ? E - : X; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EvalTypes.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EvalTypes.js deleted file mode 100644 index f4d8136b5f0..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EvalTypes.js +++ /dev/null @@ -1,18 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export {}; -//# sourceMappingURL=EvalTypes.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EventEmitter.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EventEmitter.d.ts deleted file mode 100644 index 697ec4beacc..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EventEmitter.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { EventType, Handler } from "../../vendor/mitt/src/index.js"; -/** - * @public - */ -export { EventType, Handler }; -/** - * @public - */ -export interface CommonEventEmitter { - on(event: EventType, handler: Handler): CommonEventEmitter; - off(event: EventType, handler: Handler): CommonEventEmitter; - addListener(event: EventType, handler: Handler): CommonEventEmitter; - removeListener(event: EventType, handler: Handler): CommonEventEmitter; - emit(event: EventType, eventData?: any): boolean; - once(event: EventType, handler: Handler): CommonEventEmitter; - listenerCount(event: string): number; - removeAllListeners(event?: EventType): CommonEventEmitter; -} -/** - * The EventEmitter class that many Puppeteer classes extend. - * - * @remarks - * - * This allows you to listen to events that Puppeteer classes fire and act - * accordingly. Therefore you'll mostly use {@link EventEmitter.on | on} and - * {@link EventEmitter.off | off} to bind - * and unbind to event listeners. - * - * @public - */ -export declare class EventEmitter implements CommonEventEmitter { - private emitter; - private eventsMap; - /** - * @internal - */ - constructor(); - /** - * Bind an event listener to fire when an event occurs. - * @param event - the event type you'd like to listen to. Can be a string or symbol. - * @param handler - the function to be called when the event occurs. - * @returns `this` to enable you to chain calls. - */ - on(event: EventType, handler: Handler): EventEmitter; - /** - * Remove an event listener from firing. - * @param event - the event type you'd like to stop listening to. - * @param handler - the function that should be removed. - * @returns `this` to enable you to chain calls. - */ - off(event: EventType, handler: Handler): EventEmitter; - /** - * Remove an event listener. - * @deprecated please use `off` instead. - */ - removeListener(event: EventType, handler: Handler): EventEmitter; - /** - * Add an event listener. - * @deprecated please use `on` instead. - */ - addListener(event: EventType, handler: Handler): EventEmitter; - /** - * Emit an event and call any associated listeners. - * - * @param event - the event you'd like to emit - * @param eventData - any data you'd like to emit with the event - * @returns `true` if there are any listeners, `false` if there are not. - */ - emit(event: EventType, eventData?: any): boolean; - /** - * Like `on` but the listener will only be fired once and then it will be removed. - * @param event - the event you'd like to listen to - * @param handler - the handler function to run when the event occurs - * @returns `this` to enable you to chain calls. - */ - once(event: EventType, handler: Handler): EventEmitter; - /** - * Gets the number of listeners for a given event. - * - * @param event - the event to get the listener count for - * @returns the number of listeners bound to the given event - */ - listenerCount(event: EventType): number; - /** - * Removes all listeners. If given an event argument, it will remove only - * listeners for that event. - * @param event - the event to remove listeners for. - * @returns `this` to enable you to chain calls. - */ - removeAllListeners(event?: EventType): EventEmitter; - private eventListenersCount; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EventEmitter.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EventEmitter.js deleted file mode 100644 index b0fb6132af7..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/EventEmitter.js +++ /dev/null @@ -1,110 +0,0 @@ -/// -import mitt from "../../vendor/mitt/src/index.js"; -/** - * The EventEmitter class that many Puppeteer classes extend. - * - * @remarks - * - * This allows you to listen to events that Puppeteer classes fire and act - * accordingly. Therefore you'll mostly use {@link EventEmitter.on | on} and - * {@link EventEmitter.off | off} to bind - * and unbind to event listeners. - * - * @public - */ -export class EventEmitter { - /** - * @internal - */ - constructor() { - this.eventsMap = new Map(); - this.emitter = mitt(this.eventsMap); - } - /** - * Bind an event listener to fire when an event occurs. - * @param event - the event type you'd like to listen to. Can be a string or symbol. - * @param handler - the function to be called when the event occurs. - * @returns `this` to enable you to chain calls. - */ - on(event, handler) { - this.emitter.on(event, handler); - return this; - } - /** - * Remove an event listener from firing. - * @param event - the event type you'd like to stop listening to. - * @param handler - the function that should be removed. - * @returns `this` to enable you to chain calls. - */ - off(event, handler) { - this.emitter.off(event, handler); - return this; - } - /** - * Remove an event listener. - * @deprecated please use `off` instead. - */ - removeListener(event, handler) { - this.off(event, handler); - return this; - } - /** - * Add an event listener. - * @deprecated please use `on` instead. - */ - addListener(event, handler) { - this.on(event, handler); - return this; - } - /** - * Emit an event and call any associated listeners. - * - * @param event - the event you'd like to emit - * @param eventData - any data you'd like to emit with the event - * @returns `true` if there are any listeners, `false` if there are not. - */ - emit(event, eventData) { - this.emitter.emit(event, eventData); - return this.eventListenersCount(event) > 0; - } - /** - * Like `on` but the listener will only be fired once and then it will be removed. - * @param event - the event you'd like to listen to - * @param handler - the handler function to run when the event occurs - * @returns `this` to enable you to chain calls. - */ - once(event, handler) { - const onceHandler = (eventData) => { - handler(eventData); - this.off(event, onceHandler); - }; - return this.on(event, onceHandler); - } - /** - * Gets the number of listeners for a given event. - * - * @param event - the event to get the listener count for - * @returns the number of listeners bound to the given event - */ - listenerCount(event) { - return this.eventListenersCount(event); - } - /** - * Removes all listeners. If given an event argument, it will remove only - * listeners for that event. - * @param event - the event to remove listeners for. - * @returns `this` to enable you to chain calls. - */ - removeAllListeners(event) { - if (event) { - this.eventsMap.delete(event); - } else { - this.eventsMap.clear(); - } - return this; - } - eventListenersCount(event) { - return this.eventsMap.has(event) ? this.eventsMap.get(event).length : 0; - } -} -//# sourceMappingURL=EventEmitter.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ExecutionContext.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ExecutionContext.d.ts deleted file mode 100644 index 266ce009544..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ExecutionContext.d.ts +++ /dev/null @@ -1,205 +0,0 @@ -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { ElementHandle, JSHandle } from "./JSHandle.js"; -import { CDPSession } from "./Connection.js"; -import { DOMWorld } from "./DOMWorld.js"; -import { Frame } from "./FrameManager.js"; -import { Protocol } from "../../vendor/devtools-protocol/types/protocol.d.ts"; -import { EvaluateHandleFn, SerializableOrJSHandle } from "./EvalTypes.js"; -/** - * @public - */ -export declare const EVALUATION_SCRIPT_URL = "__puppeteer_evaluation_script__"; -/** - * This class represents a context for JavaScript execution. A [Page] might have - * many execution contexts: - * - each - * {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe | - * frame } has "default" execution context that is always created after frame is - * attached to DOM. This context is returned by the - * {@link Frame.executionContext} method. - * - {@link https://developer.chrome.com/extensions | Extension}'s content scripts - * create additional execution contexts. - * - * Besides pages, execution contexts can be found in - * {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | - * workers }. - * - * @public - */ -export declare class ExecutionContext { - /** - * @internal - */ - _client: CDPSession; - /** - * @internal - */ - _world: DOMWorld; - /** - * @internal - */ - _contextId: number; - /** - * @internal - */ - _contextName: string; - /** - * @internal - */ - constructor( - client: CDPSession, - contextPayload: Protocol.Runtime.ExecutionContextDescription, - world: DOMWorld, - ); - /** - * @remarks - * - * Not every execution context is associated with a frame. For - * example, workers and extensions have execution contexts that are not - * associated with frames. - * - * @returns The frame associated with this execution context. - */ - frame(): Frame | null; - /** - * @remarks - * If the function passed to the `executionContext.evaluate` returns a - * Promise, then `executionContext.evaluate` would wait for the promise to - * resolve and return its value. If the function passed to the - * `executionContext.evaluate` returns a non-serializable value, then - * `executionContext.evaluate` resolves to `undefined`. DevTools Protocol also - * supports transferring some additional values that are not serializable by - * `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals. - * - * - * @example - * ```js - * const executionContext = await page.mainFrame().executionContext(); - * const result = await executionContext.evaluate(() => Promise.resolve(8 * 7))* ; - * console.log(result); // prints "56" - * ``` - * - * @example - * A string can also be passed in instead of a function. - * - * ```js - * console.log(await executionContext.evaluate('1 + 2')); // prints "3" - * ``` - * - * @example - * {@link JSHandle} instances can be passed as arguments to the - * `executionContext.* evaluate`: - * ```js - * const oneHandle = await executionContext.evaluateHandle(() => 1); - * const twoHandle = await executionContext.evaluateHandle(() => 2); - * const result = await executionContext.evaluate( - * (a, b) => a + b, oneHandle, * twoHandle - * ); - * await oneHandle.dispose(); - * await twoHandle.dispose(); - * console.log(result); // prints '3'. - * ``` - * @param pageFunction - a function to be evaluated in the `executionContext` - * @param args - argument to pass to the page function - * - * @returns A promise that resolves to the return value of the given function. - */ - evaluate( - pageFunction: Function | string, - ...args: unknown[] - ): Promise; - /** - * @remarks - * The only difference between `executionContext.evaluate` and - * `executionContext.evaluateHandle` is that `executionContext.evaluateHandle` - * returns an in-page object (a {@link JSHandle}). - * If the function passed to the `executionContext.evaluateHandle` returns a - * Promise, then `executionContext.evaluateHandle` would wait for the - * promise to resolve and return its value. - * - * @example - * ```js - * const context = await page.mainFrame().executionContext(); - * const aHandle = await context.evaluateHandle(() => Promise.resolve(self)); - * aHandle; // Handle for the global object. - * ``` - * - * @example - * A string can also be passed in instead of a function. - * - * ```js - * // Handle for the '3' * object. - * const aHandle = await context.evaluateHandle('1 + 2'); - * ``` - * - * @example - * JSHandle instances can be passed as arguments - * to the `executionContext.* evaluateHandle`: - * - * ```js - * const aHandle = await context.evaluateHandle(() => document.body); - * const resultHandle = await context.evaluateHandle(body => body.innerHTML, * aHandle); - * console.log(await resultHandle.jsonValue()); // prints body's innerHTML - * await aHandle.dispose(); - * await resultHandle.dispose(); - * ``` - * - * @param pageFunction - a function to be evaluated in the `executionContext` - * @param args - argument to pass to the page function - * - * @returns A promise that resolves to the return value of the given function - * as an in-page object (a {@link JSHandle}). - */ - evaluateHandle( - pageFunction: EvaluateHandleFn, - ...args: SerializableOrJSHandle[] - ): Promise; - private _evaluateInternal; - /** - * This method iterates the JavaScript heap and finds all the objects with the - * given prototype. - * @remarks - * @example - * ```js - * // Create a Map object - * await page.evaluate(() => window.map = new Map()); - * // Get a handle to the Map object prototype - * const mapPrototype = await page.evaluateHandle(() => Map.prototype); - * // Query all map instances into an array - * const mapInstances = await page.queryObjects(mapPrototype); - * // Count amount of map objects in heap - * const count = await page.evaluate(maps => maps.length, mapInstances); - * await mapInstances.dispose(); - * await mapPrototype.dispose(); - * ``` - * - * @param prototypeHandle - a handle to the object prototype - * - * @returns A handle to an array of objects with the given prototype. - */ - queryObjects(prototypeHandle: JSHandle): Promise; - /** - * @internal - */ - _adoptBackendNodeId( - backendNodeId: Protocol.DOM.BackendNodeId, - ): Promise; - /** - * @internal - */ - _adoptElementHandle(elementHandle: ElementHandle): Promise; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ExecutionContext.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ExecutionContext.js deleted file mode 100644 index b23a6cb7bdd..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/ExecutionContext.js +++ /dev/null @@ -1,354 +0,0 @@ -/// -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { assert } from "./assert.js"; -import { helper } from "./helper.js"; -import { createJSHandle, JSHandle } from "./JSHandle.js"; -/** - * @public - */ -export const EVALUATION_SCRIPT_URL = "__puppeteer_evaluation_script__"; -const SOURCE_URL_REGEX = /^[\040\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$/m; -/** - * This class represents a context for JavaScript execution. A [Page] might have - * many execution contexts: - * - each - * {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe | - * frame } has "default" execution context that is always created after frame is - * attached to DOM. This context is returned by the - * {@link Frame.executionContext} method. - * - {@link https://developer.chrome.com/extensions | Extension}'s content scripts - * create additional execution contexts. - * - * Besides pages, execution contexts can be found in - * {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | - * workers }. - * - * @public - */ -export class ExecutionContext { - /** - * @internal - */ - constructor(client, contextPayload, world) { - this._client = client; - this._world = world; - this._contextId = contextPayload.id; - this._contextName = contextPayload.name; - } - /** - * @remarks - * - * Not every execution context is associated with a frame. For - * example, workers and extensions have execution contexts that are not - * associated with frames. - * - * @returns The frame associated with this execution context. - */ - frame() { - return this._world ? this._world.frame() : null; - } - /** - * @remarks - * If the function passed to the `executionContext.evaluate` returns a - * Promise, then `executionContext.evaluate` would wait for the promise to - * resolve and return its value. If the function passed to the - * `executionContext.evaluate` returns a non-serializable value, then - * `executionContext.evaluate` resolves to `undefined`. DevTools Protocol also - * supports transferring some additional values that are not serializable by - * `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals. - * - * - * @example - * ```js - * const executionContext = await page.mainFrame().executionContext(); - * const result = await executionContext.evaluate(() => Promise.resolve(8 * 7))* ; - * console.log(result); // prints "56" - * ``` - * - * @example - * A string can also be passed in instead of a function. - * - * ```js - * console.log(await executionContext.evaluate('1 + 2')); // prints "3" - * ``` - * - * @example - * {@link JSHandle} instances can be passed as arguments to the - * `executionContext.* evaluate`: - * ```js - * const oneHandle = await executionContext.evaluateHandle(() => 1); - * const twoHandle = await executionContext.evaluateHandle(() => 2); - * const result = await executionContext.evaluate( - * (a, b) => a + b, oneHandle, * twoHandle - * ); - * await oneHandle.dispose(); - * await twoHandle.dispose(); - * console.log(result); // prints '3'. - * ``` - * @param pageFunction - a function to be evaluated in the `executionContext` - * @param args - argument to pass to the page function - * - * @returns A promise that resolves to the return value of the given function. - */ - async evaluate(pageFunction, ...args) { - return await this._evaluateInternal(true, pageFunction, ...args); - } - /** - * @remarks - * The only difference between `executionContext.evaluate` and - * `executionContext.evaluateHandle` is that `executionContext.evaluateHandle` - * returns an in-page object (a {@link JSHandle}). - * If the function passed to the `executionContext.evaluateHandle` returns a - * Promise, then `executionContext.evaluateHandle` would wait for the - * promise to resolve and return its value. - * - * @example - * ```js - * const context = await page.mainFrame().executionContext(); - * const aHandle = await context.evaluateHandle(() => Promise.resolve(self)); - * aHandle; // Handle for the global object. - * ``` - * - * @example - * A string can also be passed in instead of a function. - * - * ```js - * // Handle for the '3' * object. - * const aHandle = await context.evaluateHandle('1 + 2'); - * ``` - * - * @example - * JSHandle instances can be passed as arguments - * to the `executionContext.* evaluateHandle`: - * - * ```js - * const aHandle = await context.evaluateHandle(() => document.body); - * const resultHandle = await context.evaluateHandle(body => body.innerHTML, * aHandle); - * console.log(await resultHandle.jsonValue()); // prints body's innerHTML - * await aHandle.dispose(); - * await resultHandle.dispose(); - * ``` - * - * @param pageFunction - a function to be evaluated in the `executionContext` - * @param args - argument to pass to the page function - * - * @returns A promise that resolves to the return value of the given function - * as an in-page object (a {@link JSHandle}). - */ - async evaluateHandle(pageFunction, ...args) { - return this._evaluateInternal(false, pageFunction, ...args); - } - async _evaluateInternal(returnByValue, pageFunction, ...args) { - const suffix = `//# sourceURL=${EVALUATION_SCRIPT_URL}`; - if (helper.isString(pageFunction)) { - const contextId = this._contextId; - const expression = pageFunction; - const expressionWithSourceUrl = SOURCE_URL_REGEX.test(expression) - ? expression - : expression + "\n" + suffix; - const { exceptionDetails, result: remoteObject } = await this._client - .send("Runtime.evaluate", { - expression: expressionWithSourceUrl, - contextId, - returnByValue, - awaitPromise: true, - userGesture: true, - }) - .catch(rewriteError); - if (exceptionDetails) { - throw new Error( - "Evaluation failed: " + helper.getExceptionMessage(exceptionDetails), - ); - } - return returnByValue - ? helper.valueFromRemoteObject(remoteObject) - : createJSHandle(this, remoteObject); - } - if (typeof pageFunction !== "function") { - throw new Error( - `Expected to get |string| or |function| as the first argument, but got "${pageFunction}" instead.`, - ); - } - let functionText = pageFunction.toString(); - try { - new Function("(" + functionText + ")"); - } catch (error) { - // This means we might have a function shorthand. Try another - // time prefixing 'function '. - if (functionText.startsWith("async ")) { - functionText = "async function " + - functionText.substring("async ".length); - } else { - functionText = "function " + functionText; - } - try { - new Function("(" + functionText + ")"); - } catch (error) { - // We tried hard to serialize, but there's a weird beast here. - throw new Error("Passed function is not well-serializable!"); - } - } - let callFunctionOnPromise; - try { - callFunctionOnPromise = this._client.send("Runtime.callFunctionOn", { - functionDeclaration: functionText + "\n" + suffix + "\n", - executionContextId: this._contextId, - arguments: args.map(convertArgument.bind(this)), - returnByValue, - awaitPromise: true, - userGesture: true, - }); - } catch (error) { - if ( - error instanceof TypeError && - error.message.startsWith("Converting circular structure to JSON") - ) { - error.message += " Are you passing a nested JSHandle?"; - } - throw error; - } - const { exceptionDetails, result: remoteObject } = - await callFunctionOnPromise.catch(rewriteError); - if (exceptionDetails) { - throw new Error( - "Evaluation failed: " + helper.getExceptionMessage(exceptionDetails), - ); - } - return returnByValue - ? helper.valueFromRemoteObject(remoteObject) - : createJSHandle(this, remoteObject); - /** - * @param {*} arg - * @returns {*} - * @this {ExecutionContext} - */ - function convertArgument(arg) { - if (typeof arg === "bigint") { - // eslint-disable-line valid-typeof - return { unserializableValue: `${arg.toString()}n` }; - } - if (Object.is(arg, -0)) { - return { unserializableValue: "-0" }; - } - if (Object.is(arg, Infinity)) { - return { unserializableValue: "Infinity" }; - } - if (Object.is(arg, -Infinity)) { - return { unserializableValue: "-Infinity" }; - } - if (Object.is(arg, NaN)) { - return { unserializableValue: "NaN" }; - } - const objectHandle = arg && arg instanceof JSHandle ? arg : null; - if (objectHandle) { - if (objectHandle._context !== this) { - throw new Error( - "JSHandles can be evaluated only in the context they were created!", - ); - } - if (objectHandle._disposed) { - throw new Error("JSHandle is disposed!"); - } - if (objectHandle._remoteObject.unserializableValue) { - return { - unserializableValue: objectHandle._remoteObject.unserializableValue, - }; - } - if (!objectHandle._remoteObject.objectId) { - return { value: objectHandle._remoteObject.value }; - } - return { objectId: objectHandle._remoteObject.objectId }; - } - return { value: arg }; - } - function rewriteError(error) { - if (error.message.includes("Object reference chain is too long")) { - return { result: { type: "undefined" } }; - } - if (error.message.includes("Object couldn't be returned by value")) { - return { result: { type: "undefined" } }; - } - if ( - error.message.endsWith("Cannot find context with specified id") || - error.message.endsWith("Inspected target navigated or closed") - ) { - throw new Error( - "Execution context was destroyed, most likely because of a navigation.", - ); - } - throw error; - } - } - /** - * This method iterates the JavaScript heap and finds all the objects with the - * given prototype. - * @remarks - * @example - * ```js - * // Create a Map object - * await page.evaluate(() => window.map = new Map()); - * // Get a handle to the Map object prototype - * const mapPrototype = await page.evaluateHandle(() => Map.prototype); - * // Query all map instances into an array - * const mapInstances = await page.queryObjects(mapPrototype); - * // Count amount of map objects in heap - * const count = await page.evaluate(maps => maps.length, mapInstances); - * await mapInstances.dispose(); - * await mapPrototype.dispose(); - * ``` - * - * @param prototypeHandle - a handle to the object prototype - * - * @returns A handle to an array of objects with the given prototype. - */ - async queryObjects(prototypeHandle) { - assert(!prototypeHandle._disposed, "Prototype JSHandle is disposed!"); - assert( - prototypeHandle._remoteObject.objectId, - "Prototype JSHandle must not be referencing primitive value", - ); - const response = await this._client.send("Runtime.queryObjects", { - prototypeObjectId: prototypeHandle._remoteObject.objectId, - }); - return createJSHandle(this, response.objects); - } - /** - * @internal - */ - async _adoptBackendNodeId(backendNodeId) { - const { object } = await this._client.send("DOM.resolveNode", { - backendNodeId: backendNodeId, - executionContextId: this._contextId, - }); - return createJSHandle(this, object); - } - /** - * @internal - */ - async _adoptElementHandle(elementHandle) { - assert( - elementHandle.executionContext() !== this, - "Cannot adopt handle that already belongs to this execution context", - ); - assert(this._world, "Cannot adopt handle without DOMWorld"); - const nodeInfo = await this._client.send("DOM.describeNode", { - objectId: elementHandle._remoteObject.objectId, - }); - return this._adoptBackendNodeId(nodeInfo.node.backendNodeId); - } -} -//# sourceMappingURL=ExecutionContext.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/FileChooser.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/FileChooser.d.ts deleted file mode 100644 index 9123464e43d..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/FileChooser.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { ElementHandle } from "./JSHandle.js"; -import { Protocol } from "../../vendor/devtools-protocol/types/protocol.d.ts"; -/** - * File choosers let you react to the page requesting for a file. - * @remarks - * `FileChooser` objects are returned via the `page.waitForFileChooser` method. - * @example - * An example of using `FileChooser`: - * ```js - * const [fileChooser] = await Promise.all([ - * page.waitForFileChooser(), - * page.click('#upload-file-button'), // some button that triggers file selection - * ]); - * await fileChooser.accept(['/tmp/myfile.pdf']); - * ``` - * **NOTE** In browsers, only one file chooser can be opened at a time. - * All file choosers must be accepted or canceled. Not doing so will prevent - * subsequent file choosers from appearing. - * @public - */ -export declare class FileChooser { - private _element; - private _multiple; - private _handled; - /** - * @internal - */ - constructor( - element: ElementHandle, - event: Protocol.Page.FileChooserOpenedEvent, - ); - /** - * Whether file chooser allow for {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-multiple | multiple} file selection. - */ - isMultiple(): boolean; - /** - * Accept the file chooser request with given paths. - * @param filePaths - If some of the `filePaths` are relative paths, - * then they are resolved relative to the {@link https://nodejs.org/api/process.html#process_process_cwd | current working directory}. - */ - accept(filePaths: string[]): Promise; - /** - * Closes the file chooser without selecting any files. - */ - cancel(): void; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/FileChooser.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/FileChooser.js deleted file mode 100644 index 213bcb33498..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/FileChooser.js +++ /dev/null @@ -1,75 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { assert } from "./assert.js"; -/** - * File choosers let you react to the page requesting for a file. - * @remarks - * `FileChooser` objects are returned via the `page.waitForFileChooser` method. - * @example - * An example of using `FileChooser`: - * ```js - * const [fileChooser] = await Promise.all([ - * page.waitForFileChooser(), - * page.click('#upload-file-button'), // some button that triggers file selection - * ]); - * await fileChooser.accept(['/tmp/myfile.pdf']); - * ``` - * **NOTE** In browsers, only one file chooser can be opened at a time. - * All file choosers must be accepted or canceled. Not doing so will prevent - * subsequent file choosers from appearing. - * @public - */ -export class FileChooser { - /** - * @internal - */ - constructor(element, event) { - this._handled = false; - this._element = element; - this._multiple = event.mode !== "selectSingle"; - } - /** - * Whether file chooser allow for {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-multiple | multiple} file selection. - */ - isMultiple() { - return this._multiple; - } - /** - * Accept the file chooser request with given paths. - * @param filePaths - If some of the `filePaths` are relative paths, - * then they are resolved relative to the {@link https://nodejs.org/api/process.html#process_process_cwd | current working directory}. - */ - async accept(filePaths) { - assert( - !this._handled, - "Cannot accept FileChooser which is already handled!", - ); - this._handled = true; - await this._element.uploadFile(...filePaths); - } - /** - * Closes the file chooser without selecting any files. - */ - cancel() { - assert( - !this._handled, - "Cannot cancel FileChooser which is already handled!", - ); - this._handled = true; - } -} -//# sourceMappingURL=FileChooser.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/FrameManager.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/FrameManager.d.ts deleted file mode 100644 index 0f234c520b2..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/FrameManager.d.ts +++ /dev/null @@ -1,784 +0,0 @@ -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { EventEmitter } from "./EventEmitter.js"; -import { ExecutionContext } from "./ExecutionContext.js"; -import { PuppeteerLifeCycleEvent } from "./LifecycleWatcher.js"; -import { DOMWorld, WaitForSelectorOptions } from "./DOMWorld.js"; -import { NetworkManager } from "./NetworkManager.js"; -import { TimeoutSettings } from "./TimeoutSettings.js"; -import { CDPSession } from "./Connection.js"; -import { ElementHandle, JSHandle } from "./JSHandle.js"; -import { MouseButton } from "./Input.js"; -import { Page } from "./Page.js"; -import { HTTPResponse } from "./HTTPResponse.js"; -import { Protocol } from "../../vendor/devtools-protocol/types/protocol.d.ts"; -import { - EvaluateFn, - EvaluateFnReturnType, - EvaluateHandleFn, - SerializableOrJSHandle, - UnwrapPromiseLike, - WrapElementHandle, -} from "./EvalTypes.js"; -/** - * We use symbols to prevent external parties listening to these events. - * They are internal to Puppeteer. - * - * @internal - */ -export declare const FrameManagerEmittedEvents: { - FrameAttached: symbol; - FrameNavigated: symbol; - FrameDetached: symbol; - LifecycleEvent: symbol; - FrameNavigatedWithinDocument: symbol; - ExecutionContextCreated: symbol; - ExecutionContextDestroyed: symbol; -}; -/** - * @internal - */ -export declare class FrameManager extends EventEmitter { - _client: CDPSession; - private _page; - private _networkManager; - _timeoutSettings: TimeoutSettings; - private _frames; - private _contextIdToContext; - private _isolatedWorlds; - private _mainFrame; - constructor( - client: CDPSession, - page: Page, - ignoreHTTPSErrors: boolean, - timeoutSettings: TimeoutSettings, - ); - initialize(): Promise; - networkManager(): NetworkManager; - navigateFrame(frame: Frame, url: string, options?: { - referer?: string; - timeout?: number; - waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[]; - }): Promise; - waitForFrameNavigation(frame: Frame, options?: { - timeout?: number; - waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[]; - }): Promise; - private _onFrameMoved; - _onLifecycleEvent(event: Protocol.Page.LifecycleEventEvent): void; - _onFrameStoppedLoading(frameId: string): void; - _handleFrameTree(frameTree: Protocol.Page.FrameTree): void; - page(): Page; - mainFrame(): Frame; - frames(): Frame[]; - frame(frameId: string): Frame | null; - _onFrameAttached(frameId: string, parentFrameId?: string): void; - _onFrameNavigated(framePayload: Protocol.Page.Frame): void; - _ensureIsolatedWorld(name: string): Promise; - _onFrameNavigatedWithinDocument(frameId: string, url: string): void; - _onFrameDetached(frameId: string): void; - _onExecutionContextCreated( - contextPayload: Protocol.Runtime.ExecutionContextDescription, - ): void; - private _onExecutionContextDestroyed; - private _onExecutionContextsCleared; - executionContextById(contextId: number): ExecutionContext; - private _removeFramesRecursively; -} -/** - * @public - */ -export interface FrameWaitForFunctionOptions { - /** - * An interval at which the `pageFunction` is executed, defaults to `raf`. If - * `polling` is a number, then it is treated as an interval in milliseconds at - * which the function would be executed. If `polling` is a string, then it can - * be one of the following values: - * - * - `raf` - to constantly execute `pageFunction` in `requestAnimationFrame` - * callback. This is the tightest polling mode which is suitable to observe - * styling changes. - * - * - `mutation` - to execute `pageFunction` on every DOM mutation. - */ - polling?: string | number; - /** - * Maximum time to wait in milliseconds. Defaults to `30000` (30 seconds). - * Pass `0` to disable the timeout. Puppeteer's default timeout can be changed - * using {@link Page.setDefaultTimeout}. - */ - timeout?: number; -} -/** - * @public - */ -export interface FrameAddScriptTagOptions { - /** - * the URL of the script to be added. - */ - url?: string; - /** - * The path to a JavaScript file to be injected into the frame. - * @remarks - * If `path` is a relative path, it is resolved relative to the current - * working directory (`process.cwd()` in Node.js). - */ - path?: string; - /** - * Raw JavaScript content to be injected into the frame. - */ - content?: string; - /** - * Set the script's `type`. Use `module` in order to load an ES2015 module. - */ - type?: string; -} -/** - * @public - */ -export interface FrameAddStyleTagOptions { - /** - * the URL of the CSS file to be added. - */ - url?: string; - /** - * The path to a CSS file to be injected into the frame. - * @remarks - * If `path` is a relative path, it is resolved relative to the current - * working directory (`process.cwd()` in Node.js). - */ - path?: string; - /** - * Raw CSS content to be injected into the frame. - */ - content?: string; -} -/** - * At every point of time, page exposes its current frame tree via the - * {@link Page.mainFrame | page.mainFrame} and - * {@link Frame.childFrames | frame.childFrames} methods. - * - * @remarks - * - * `Frame` object lifecycles are controlled by three events that are all - * dispatched on the page object: - * - * - {@link PageEmittedEvents.FrameAttached} - * - * - {@link PageEmittedEvents.FrameNavigated} - * - * - {@link PageEmittedEvents.FrameDetached} - * - * @Example - * An example of dumping frame tree: - * - * ```js - * const puppeteer = require('puppeteer'); - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.goto('https://www.google.com/chrome/browser/canary.html'); - * dumpFrameTree(page.mainFrame(), ''); - * await browser.close(); - * - * function dumpFrameTree(frame, indent) { - * console.log(indent + frame.url()); - * for (const child of frame.childFrames()) { - * dumpFrameTree(child, indent + ' '); - * } - * } - * })(); - * ``` - * - * @Example - * An example of getting text from an iframe element: - * - * ```js - * const frame = page.frames().find(frame => frame.name() === 'myframe'); - * const text = await frame.$eval('.selector', element => element.textContent); - * console.log(text); - * ``` - * - * @public - */ -export declare class Frame { - /** - * @internal - */ - _frameManager: FrameManager; - private _parentFrame?; - /** - * @internal - */ - _id: string; - private _url; - private _detached; - /** - * @internal - */ - _loaderId: string; - /** - * @internal - */ - _name?: string; - /** - * @internal - */ - _lifecycleEvents: Set; - /** - * @internal - */ - _mainWorld: DOMWorld; - /** - * @internal - */ - _secondaryWorld: DOMWorld; - /** - * @internal - */ - _childFrames: Set
- *
Hello!
- *
Hi!
- *
- * ``` - * - * @example - * ```js - * const feedHandle = await page.$('.feed'); - * expect(await feedHandle.$$eval('.tweet', nodes => nodes.map(n => n.innerText))) - * .toEqual(['Hello!', 'Hi!']); - * ``` - */ - $$eval( - selector: string, - pageFunction: ( - elements: any[], - ...args: unknown[] - ) => ReturnType | Promise, - ...args: SerializableOrJSHandle[] - ): Promise>; - /** - * The method evaluates the XPath expression relative to the elementHandle. - * If there are no such elements, the method will resolve to an empty array. - * @param expression - Expression to {@link https://developer.mozilla.org/en-US/docs/Web/API/Document/evaluate | evaluate} - */ - $x(expression: string): Promise; - /** - * Resolves to true if the element is visible in the current viewport. - */ - isIntersectingViewport(): Promise; -} -/** - * @public - */ -export interface ClickOptions { - /** - * Time to wait between `mousedown` and `mouseup` in milliseconds. - * - * @defaultValue 0 - */ - delay?: number; - /** - * @defaultValue 'left' - */ - button?: "left" | "right" | "middle"; - /** - * @defaultValue 1 - */ - clickCount?: number; -} -/** - * @public - */ -export interface PressOptions { - /** - * Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0. - */ - delay?: number; - /** - * If specified, generates an input event with this text. - */ - text?: string; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/JSHandle.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/JSHandle.js deleted file mode 100644 index 3e6b4dda522..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/JSHandle.js +++ /dev/null @@ -1,771 +0,0 @@ -/// -/** - * Copyright 2019 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { assert } from "./assert.js"; -import { debugError, helper } from "./helper.js"; -import { getQueryHandlerAndSelector } from "./QueryHandler.js"; -import { pathResolve } from "../../vendor/std.ts"; -/** - * @internal - */ -export function createJSHandle(context, remoteObject) { - const frame = context.frame(); - if (remoteObject.subtype === "node" && frame) { - const frameManager = frame._frameManager; - return new ElementHandle( - context, - context._client, - remoteObject, - frameManager.page(), - frameManager, - ); - } - return new JSHandle(context, context._client, remoteObject); -} -/** - * Represents an in-page JavaScript object. JSHandles can be created with the - * {@link Page.evaluateHandle | page.evaluateHandle} method. - * - * @example - * ```js - * const windowHandle = await page.evaluateHandle(() => window); - * ``` - * - * JSHandle prevents the referenced JavaScript object from being garbage-collected - * unless the handle is {@link JSHandle.dispose | disposed}. JSHandles are auto- - * disposed when their origin frame gets navigated or the parent context gets destroyed. - * - * JSHandle instances can be used as arguments for {@link Page.$eval}, - * {@link Page.evaluate}, and {@link Page.evaluateHandle}. - * - * @public - */ -export class JSHandle { - /** - * @internal - */ - constructor(context, client, remoteObject) { - /** - * @internal - */ - this._disposed = false; - this._context = context; - this._client = client; - this._remoteObject = remoteObject; - } - /** Returns the execution context the handle belongs to. - */ - executionContext() { - return this._context; - } - /** - * This method passes this handle as the first argument to `pageFunction`. - * If `pageFunction` returns a Promise, then `handle.evaluate` would wait - * for the promise to resolve and return its value. - * - * @example - * ```js - * const tweetHandle = await page.$('.tweet .retweets'); - * expect(await tweetHandle.evaluate(node => node.innerText)).toBe('10'); - * ``` - */ - async evaluate(pageFunction, ...args) { - return await this.executionContext().evaluate(pageFunction, this, ...args); - } - /** - * This method passes this handle as the first argument to `pageFunction`. - * - * @remarks - * - * The only difference between `jsHandle.evaluate` and - * `jsHandle.evaluateHandle` is that `jsHandle.evaluateHandle` - * returns an in-page object (JSHandle). - * - * If the function passed to `jsHandle.evaluateHandle` returns a Promise, - * then `evaluateHandle.evaluateHandle` waits for the promise to resolve and - * returns its value. - * - * See {@link Page.evaluateHandle} for more details. - */ - async evaluateHandle(pageFunction, ...args) { - return await this.executionContext().evaluateHandle( - pageFunction, - this, - ...args, - ); - } - /** Fetches a single property from the referenced object. - */ - async getProperty(propertyName) { - const objectHandle = await this.evaluateHandle((object, propertyName) => { - const result = { __proto__: null }; - result[propertyName] = object[propertyName]; - return result; - }, propertyName); - const properties = await objectHandle.getProperties(); - const result = properties.get(propertyName) || null; - await objectHandle.dispose(); - return result; - } - /** - * The method returns a map with property names as keys and JSHandle - * instances for the property values. - * - * @example - * ```js - * const listHandle = await page.evaluateHandle(() => document.body.children); - * const properties = await listHandle.getProperties(); - * const children = []; - * for (const property of properties.values()) { - * const element = property.asElement(); - * if (element) - * children.push(element); - * } - * children; // holds elementHandles to all children of document.body - * ``` - */ - async getProperties() { - const response = await this._client.send("Runtime.getProperties", { - objectId: this._remoteObject.objectId, - ownProperties: true, - }); - const result = new Map(); - for (const property of response.result) { - if (!property.enumerable) { - continue; - } - result.set(property.name, createJSHandle(this._context, property.value)); - } - return result; - } - /** - * Returns a JSON representation of the object. - * - * @remarks - * - * The JSON is generated by running {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify | JSON.stringify} - * on the object in page and consequent {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse | JSON.parse} in puppeteer. - * **NOTE** The method throws if the referenced object is not stringifiable. - */ - async jsonValue() { - if (this._remoteObject.objectId) { - const response = await this._client.send("Runtime.callFunctionOn", { - functionDeclaration: "function() { return this; }", - objectId: this._remoteObject.objectId, - returnByValue: true, - awaitPromise: true, - }); - return helper.valueFromRemoteObject(response.result); - } - return helper.valueFromRemoteObject(this._remoteObject); - } - /** - * Returns either `null` or the object handle itself, if the object handle is - * an instance of {@link ElementHandle}. - */ - asElement() { - // This always returns null, but subclasses can override this and return an - // ElementHandle. - return null; - } - /** - * Stops referencing the element handle, and resolves when the object handle is - * successfully disposed of. - */ - async dispose() { - if (this._disposed) { - return; - } - this._disposed = true; - await helper.releaseObject(this._client, this._remoteObject); - } - /** - * Returns a string representation of the JSHandle. - * - * @remarks Useful during debugging. - */ - toString() { - if (this._remoteObject.objectId) { - const type = this._remoteObject.subtype || this._remoteObject.type; - return "JSHandle@" + type; - } - return "JSHandle:" + helper.valueFromRemoteObject(this._remoteObject); - } -} -/** - * ElementHandle represents an in-page DOM element. - * - * @remarks - * - * ElementHandles can be created with the {@link Page.$} method. - * - * ```js - * const puppeteer = require('puppeteer'); - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.goto('https://example.com'); - * const hrefElement = await page.$('a'); - * await hrefElement.click(); - * // ... - * })(); - * ``` - * - * ElementHandle prevents the DOM element from being garbage-collected unless the - * handle is {@link JSHandle.dispose | disposed}. ElementHandles are auto-disposed - * when their origin frame gets navigated. - * - * ElementHandle instances can be used as arguments in {@link Page.$eval} and - * {@link Page.evaluate} methods. - * - * If you're using TypeScript, ElementHandle takes a generic argument that - * denotes the type of element the handle is holding within. For example, if you - * have a handle to a `` element matching `selector`, the method - * throws an error. - * - * @example - * ```js - * handle.select('blue'); // single selection - * handle.select('red', 'green', 'blue'); // multiple selections - * ``` - * @param values - Values of options to select. If the ` element."); - } - const options = Array.from(element.options); - element.value = undefined; - for (const option of options) { - option.selected = values.includes(option.value); - if (option.selected && !element.multiple) { - break; - } - } - element.dispatchEvent(new Event("input", { bubbles: true })); - element.dispatchEvent(new Event("change", { bubbles: true })); - return options - .filter((option) => option.selected) - .map((option) => option.value); - }, values); - } - /** - * This method expects `elementHandle` to point to an - * {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input | input element}. - * @param filePaths - Sets the value of the file input to these paths. - * If some of the `filePaths` are relative paths, then they are resolved - * relative to the {@link https://nodejs.org/api/process.html#process_process_cwd | current working directory} - */ - async uploadFile(...filePaths) { - const isMultiple = await this.evaluate((element) => element.multiple); - assert( - filePaths.length <= 1 || isMultiple, - "Multiple file uploads only work with ", - ); - // Locate all files and confirm that they exist. - const files = await Promise.all(filePaths.map(async (filePath) => { - const resolvedPath = pathResolve(filePath); - try { - await Deno.stat(filePath); - } catch (error) { - if (error instanceof Deno.errors.NotFound) { - throw new Error(`${filePath} does not exist or is not readable`); - } - } - return resolvedPath; - })); - const { objectId } = this._remoteObject; - const { node } = await this._client.send("DOM.describeNode", { objectId }); - const { backendNodeId } = node; - // The zero-length array is a special case, it seems that DOM.setFileInputFiles does - // not actually update the files in that case, so the solution is to eval the element - // value to a new FileList directly. - if (files.length === 0) { - await this.evaluate((element) => { - element.files = new DataTransfer().files; - // Dispatch events for this case because it should behave akin to a user action. - element.dispatchEvent(new Event("input", { bubbles: true })); - element.dispatchEvent(new Event("change", { bubbles: true })); - }); - } else { - await this._client.send("DOM.setFileInputFiles", { - objectId, - files, - backendNodeId, - }); - } - } - /** - * This method scrolls element into view if needed, and then uses - * {@link Touchscreen.tap} to tap in the center of the element. - * If the element is detached from DOM, the method throws an error. - */ - async tap() { - await this._scrollIntoViewIfNeeded(); - const { x, y } = await this._clickablePoint(); - await this._page.touchscreen.tap(x, y); - } - /** - * Calls {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus | focus} on the element. - */ - async focus() { - await this.evaluate((element) => element.focus()); - } - /** - * Focuses the element, and then sends a `keydown`, `keypress`/`input`, and - * `keyup` event for each character in the text. - * - * To press a special key, like `Control` or `ArrowDown`, - * use {@link ElementHandle.press}. - * - * @example - * ```js - * await elementHandle.type('Hello'); // Types instantly - * await elementHandle.type('World', {delay: 100}); // Types slower, like a user - * ``` - * - * @example - * An example of typing into a text field and then submitting the form: - * - * ```js - * const elementHandle = await page.$('input'); - * await elementHandle.type('some text'); - * await elementHandle.press('Enter'); - * ``` - */ - async type(text, options) { - await this.focus(); - await this._page.keyboard.type(text, options); - } - /** - * Focuses the element, and then uses {@link Keyboard.down} and {@link Keyboard.up}. - * - * @remarks - * If `key` is a single character and no modifier keys besides `Shift` - * are being held down, a `keypress`/`input` event will also be generated. - * The `text` option can be specified to force an input event to be generated. - * - * **NOTE** Modifier keys DO affect `elementHandle.press`. Holding down `Shift` - * will type the text in upper case. - * - * @param key - Name of key to press, such as `ArrowLeft`. - * See {@link KeyInput} for a list of all key names. - */ - async press(key, options) { - await this.focus(); - await this._page.keyboard.press(key, options); - } - /** - * This method returns the bounding box of the element (relative to the main frame), - * or `null` if the element is not visible. - */ - async boundingBox() { - const result = await this._getBoxModel(); - if (!result) { - return null; - } - const quad = result.model.border; - const x = Math.min(quad[0], quad[2], quad[4], quad[6]); - const y = Math.min(quad[1], quad[3], quad[5], quad[7]); - const width = Math.max(quad[0], quad[2], quad[4], quad[6]) - x; - const height = Math.max(quad[1], quad[3], quad[5], quad[7]) - y; - return { x, y, width, height }; - } - /** - * This method returns boxes of the element, or `null` if the element is not visible. - * - * @remarks - * - * Boxes are represented as an array of points; - * Each Point is an object `{x, y}`. Box points are sorted clock-wise. - */ - async boxModel() { - const result = await this._getBoxModel(); - if (!result) { - return null; - } - const { content, padding, border, margin, width, height } = result.model; - return { - content: this._fromProtocolQuad(content), - padding: this._fromProtocolQuad(padding), - border: this._fromProtocolQuad(border), - margin: this._fromProtocolQuad(margin), - width, - height, - }; - } - /** - * This method scrolls element into view if needed, and then uses - * {@link Page.screenshot} to take a screenshot of the element. - * If the element is detached from DOM, the method throws an error. - */ - async screenshot(options = {}) { - let needsViewportReset = false; - let boundingBox = await this.boundingBox(); - assert(boundingBox, "Node is either not visible or not an HTMLElement"); - const viewport = this._page.viewport(); - if ( - viewport && - (boundingBox.width > viewport.width || - boundingBox.height > viewport.height) - ) { - const newViewport = { - width: Math.max(viewport.width, Math.ceil(boundingBox.width)), - height: Math.max(viewport.height, Math.ceil(boundingBox.height)), - }; - await this._page.setViewport(Object.assign({}, viewport, newViewport)); - needsViewportReset = true; - } - await this._scrollIntoViewIfNeeded(); - boundingBox = await this.boundingBox(); - assert(boundingBox, "Node is either not visible or not an HTMLElement"); - assert(boundingBox.width !== 0, "Node has 0 width."); - assert(boundingBox.height !== 0, "Node has 0 height."); - const { layoutViewport: { pageX, pageY } } = await this._client.send( - "Page.getLayoutMetrics", - ); - const clip = Object.assign({}, boundingBox); - clip.x += pageX; - clip.y += pageY; - const imageData = await this._page.screenshot(Object.assign({}, { - clip, - }, options)); - if (needsViewportReset) { - await this._page.setViewport(viewport); - } - return imageData; - } - /** - * Runs `element.querySelector` within the page. If no element matches the selector, - * the return value resolves to `null`. - */ - async $(selector) { - const { updatedSelector, queryHandler } = getQueryHandlerAndSelector( - selector, - ); - return queryHandler.queryOne(this, updatedSelector); - } - /** - * Runs `element.querySelectorAll` within the page. If no elements match the selector, - * the return value resolves to `[]`. - */ - async $$(selector) { - const { updatedSelector, queryHandler } = getQueryHandlerAndSelector( - selector, - ); - return queryHandler.queryAll(this, updatedSelector); - } - /** - * This method runs `document.querySelector` within the element and passes it as - * the first argument to `pageFunction`. If there's no element matching `selector`, - * the method throws an error. - * - * If `pageFunction` returns a Promise, then `frame.$eval` would wait for the promise - * to resolve and return its value. - * - * @example - * ```js - * const tweetHandle = await page.$('.tweet'); - * expect(await tweetHandle.$eval('.like', node => node.innerText)).toBe('100'); - * expect(await tweetHandle.$eval('.retweets', node => node.innerText)).toBe('10'); - * ``` - */ - async $eval(selector, pageFunction, ...args) { - const elementHandle = await this.$(selector); - if (!elementHandle) { - throw new Error( - `Error: failed to find element matching selector "${selector}"`, - ); - } - const result = await elementHandle.evaluate(pageFunction, ...args); - await elementHandle.dispose(); - /** - * This `as` is a little unfortunate but helps TS understand the behavior of - * `elementHandle.evaluate`. If evaluate returns an element it will return an - * ElementHandle instance, rather than the plain object. All the - * WrapElementHandle type does is wrap ReturnType into - * ElementHandle if it is an ElementHandle, or leave it alone as - * ReturnType if it isn't. - */ - return result; - } - /** - * This method runs `document.querySelectorAll` within the element and passes it as - * the first argument to `pageFunction`. If there's no element matching `selector`, - * the method throws an error. - * - * If `pageFunction` returns a Promise, then `frame.$$eval` would wait for the - * promise to resolve and return its value. - * - * @example - * ```html - *
- *
Hello!
- *
Hi!
- *
- * ``` - * - * @example - * ```js - * const feedHandle = await page.$('.feed'); - * expect(await feedHandle.$$eval('.tweet', nodes => nodes.map(n => n.innerText))) - * .toEqual(['Hello!', 'Hi!']); - * ``` - */ - async $$eval(selector, pageFunction, ...args) { - const { updatedSelector, queryHandler } = getQueryHandlerAndSelector( - selector, - ); - const arrayHandle = await queryHandler.queryAllArray(this, updatedSelector); - const result = await arrayHandle.evaluate(pageFunction, ...args); - await arrayHandle.dispose(); - /* This `as` exists for the same reason as the `as` in $eval above. - * See the comment there for a full explanation. - */ - return result; - } - /** - * The method evaluates the XPath expression relative to the elementHandle. - * If there are no such elements, the method will resolve to an empty array. - * @param expression - Expression to {@link https://developer.mozilla.org/en-US/docs/Web/API/Document/evaluate | evaluate} - */ - async $x(expression) { - const arrayHandle = await this.evaluateHandle((element, expression) => { - const document = element.ownerDocument || element; - const iterator = document.evaluate( - expression, - element, - null, - XPathResult.ORDERED_NODE_ITERATOR_TYPE, - ); - const array = []; - let item; - while ((item = iterator.iterateNext())) { - array.push(item); - } - return array; - }, expression); - const properties = await arrayHandle.getProperties(); - await arrayHandle.dispose(); - const result = []; - for (const property of properties.values()) { - const elementHandle = property.asElement(); - if (elementHandle) { - result.push(elementHandle); - } - } - return result; - } - /** - * Resolves to true if the element is visible in the current viewport. - */ - async isIntersectingViewport() { - return await this.evaluate(async (element) => { - const visibleRatio = await new Promise((resolve) => { - const observer = new IntersectionObserver((entries) => { - resolve(entries[0].intersectionRatio); - observer.disconnect(); - }); - observer.observe(element); - }); - return visibleRatio > 0; - }); - } -} -function computeQuadArea(quad) { - // Compute sum of all directed areas of adjacent triangles - // https://en.wikipedia.org/wiki/Polygon#Simple_polygons - let area = 0; - for (let i = 0; i < quad.length; ++i) { - const p1 = quad[i]; - const p2 = quad[(i + 1) % quad.length]; - area += (p1.x * p2.y - p2.x * p1.y) / 2; - } - return Math.abs(area); -} -//# sourceMappingURL=JSHandle.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/LifecycleWatcher.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/LifecycleWatcher.d.ts deleted file mode 100644 index 6a76c093c54..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/LifecycleWatcher.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright 2019 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { PuppeteerEventListener } from "./helper.js"; -import { TimeoutError } from "./Errors.js"; -import { Frame, FrameManager } from "./FrameManager.js"; -import { HTTPRequest } from "./HTTPRequest.js"; -import { HTTPResponse } from "./HTTPResponse.js"; -/** - * @public - */ -export declare type PuppeteerLifeCycleEvent = - | "load" - | "domcontentloaded" - | "networkidle0" - | "networkidle2"; -/** - * @public - */ -export declare type ProtocolLifeCycleEvent = - | "load" - | "DOMContentLoaded" - | "networkIdle" - | "networkAlmostIdle"; -/** - * @internal - */ -export declare class LifecycleWatcher { - _expectedLifecycle: ProtocolLifeCycleEvent[]; - _frameManager: FrameManager; - _frame: Frame; - _timeout: number; - _navigationRequest?: HTTPRequest; - _eventListeners: PuppeteerEventListener[]; - _initialLoaderId: string; - _sameDocumentNavigationPromise: Promise; - _sameDocumentNavigationCompleteCallback: (x?: Error) => void; - _lifecyclePromise: Promise; - _lifecycleCallback: () => void; - _newDocumentNavigationPromise: Promise; - _newDocumentNavigationCompleteCallback: (x?: Error) => void; - _terminationPromise: Promise; - _terminationCallback: (x?: Error) => void; - _timeoutPromise: Promise; - _maximumTimer?: number; - _hasSameDocumentNavigation?: boolean; - constructor( - frameManager: FrameManager, - frame: Frame, - waitUntil: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[], - timeout: number, - ); - _onRequest(request: HTTPRequest): void; - _onFrameDetached(frame: Frame): void; - navigationResponse(): HTTPResponse | null; - _terminate(error: Error): void; - sameDocumentNavigationPromise(): Promise; - newDocumentNavigationPromise(): Promise; - lifecyclePromise(): Promise; - timeoutOrTerminationPromise(): Promise; - _createTimeoutPromise(): Promise; - _navigatedWithinDocument(frame: Frame): void; - _checkLifecycleComplete(): void; - dispose(): void; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/LifecycleWatcher.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/LifecycleWatcher.js deleted file mode 100644 index d11d5478fdc..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/LifecycleWatcher.js +++ /dev/null @@ -1,189 +0,0 @@ -/// -/** - * Copyright 2019 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { assert } from "./assert.js"; -import { helper } from "./helper.js"; -import { TimeoutError } from "./Errors.js"; -import { FrameManagerEmittedEvents } from "./FrameManager.js"; -import { NetworkManagerEmittedEvents } from "./NetworkManager.js"; -import { CDPSessionEmittedEvents } from "./Connection.js"; -const puppeteerToProtocolLifecycle = new Map([ - ["load", "load"], - ["domcontentloaded", "DOMContentLoaded"], - ["networkidle0", "networkIdle"], - ["networkidle2", "networkAlmostIdle"], -]); -/** - * @internal - */ -export class LifecycleWatcher { - constructor(frameManager, frame, waitUntil, timeout) { - if (Array.isArray(waitUntil)) { - waitUntil = waitUntil.slice(); - } else if (typeof waitUntil === "string") { - waitUntil = [waitUntil]; - } - this._expectedLifecycle = waitUntil.map((value) => { - const protocolEvent = puppeteerToProtocolLifecycle.get(value); - assert(protocolEvent, "Unknown value for options.waitUntil: " + value); - return protocolEvent; - }); - this._frameManager = frameManager; - this._frame = frame; - this._initialLoaderId = frame._loaderId; - this._timeout = timeout; - this._navigationRequest = null; - this._eventListeners = [ - helper.addEventListener( - frameManager._client, - CDPSessionEmittedEvents.Disconnected, - () => - this._terminate( - new Error("Navigation failed because browser has disconnected!"), - ), - ), - helper.addEventListener( - this._frameManager, - FrameManagerEmittedEvents.LifecycleEvent, - this._checkLifecycleComplete.bind(this), - ), - helper.addEventListener( - this._frameManager, - FrameManagerEmittedEvents.FrameNavigatedWithinDocument, - this._navigatedWithinDocument.bind(this), - ), - helper.addEventListener( - this._frameManager, - FrameManagerEmittedEvents.FrameDetached, - this._onFrameDetached.bind(this), - ), - helper.addEventListener( - this._frameManager.networkManager(), - NetworkManagerEmittedEvents.Request, - this._onRequest.bind(this), - ), - ]; - this._sameDocumentNavigationPromise = new Promise((fulfill) => { - this._sameDocumentNavigationCompleteCallback = fulfill; - }); - this._lifecyclePromise = new Promise((fulfill) => { - this._lifecycleCallback = fulfill; - }); - this._newDocumentNavigationPromise = new Promise((fulfill) => { - this._newDocumentNavigationCompleteCallback = fulfill; - }); - this._timeoutPromise = this._createTimeoutPromise(); - this._terminationPromise = new Promise((fulfill) => { - this._terminationCallback = fulfill; - }); - this._checkLifecycleComplete(); - } - _onRequest(request) { - if (request.frame() !== this._frame || !request.isNavigationRequest()) { - return; - } - this._navigationRequest = request; - } - _onFrameDetached(frame) { - if (this._frame === frame) { - this._terminationCallback.call( - null, - new Error("Navigating frame was detached"), - ); - return; - } - this._checkLifecycleComplete(); - } - navigationResponse() { - return this._navigationRequest ? this._navigationRequest.response() : null; - } - _terminate(error) { - this._terminationCallback.call(null, error); - } - sameDocumentNavigationPromise() { - return this._sameDocumentNavigationPromise; - } - newDocumentNavigationPromise() { - return this._newDocumentNavigationPromise; - } - lifecyclePromise() { - return this._lifecyclePromise; - } - timeoutOrTerminationPromise() { - return Promise.race([this._timeoutPromise, this._terminationPromise]); - } - _createTimeoutPromise() { - if (!this._timeout) { - return new Promise(() => {}); - } - const errorMessage = "Navigation timeout of " + this._timeout + - " ms exceeded"; - return new Promise(( - fulfill, - ) => (this._maximumTimer = setTimeout(fulfill, this._timeout))).then(() => - new TimeoutError(errorMessage) - ); - } - _navigatedWithinDocument(frame) { - if (frame !== this._frame) { - return; - } - this._hasSameDocumentNavigation = true; - this._checkLifecycleComplete(); - } - _checkLifecycleComplete() { - // We expect navigation to commit. - if (!checkLifecycle(this._frame, this._expectedLifecycle)) { - return; - } - this._lifecycleCallback(); - if ( - this._frame._loaderId === this._initialLoaderId && - !this._hasSameDocumentNavigation - ) { - return; - } - if (this._hasSameDocumentNavigation) { - this._sameDocumentNavigationCompleteCallback(); - } - if (this._frame._loaderId !== this._initialLoaderId) { - this._newDocumentNavigationCompleteCallback(); - } - /** - * @param {!Frame} frame - * @param {!Array} expectedLifecycle - * @returns {boolean} - */ - function checkLifecycle(frame, expectedLifecycle) { - for (const event of expectedLifecycle) { - if (!frame._lifecycleEvents.has(event)) { - return false; - } - } - for (const child of frame.childFrames()) { - if (!checkLifecycle(child, expectedLifecycle)) { - return false; - } - } - return true; - } - } - dispose() { - helper.removeEventListeners(this._eventListeners); - clearTimeout(this._maximumTimer); - } -} -//# sourceMappingURL=LifecycleWatcher.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/NetworkConditions.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/NetworkConditions.d.ts deleted file mode 100644 index 78fa036e8b5..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/NetworkConditions.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright 2021 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { NetworkConditions } from "./NetworkManager.js"; -/** - * @public - */ -export declare type PredefinedNetworkConditions = { - [name: string]: NetworkConditions; -}; -/** - * @public - */ -export declare const networkConditions: PredefinedNetworkConditions; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/NetworkConditions.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/NetworkConditions.js deleted file mode 100644 index 8e23bb25232..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/NetworkConditions.js +++ /dev/null @@ -1,32 +0,0 @@ -/// -/** - * Copyright 2021 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @public - */ -export const networkConditions = { - "Slow 3G": { - download: ((500 * 1000) / 8) * 0.8, - upload: ((500 * 1000) / 8) * 0.8, - latency: 400 * 5, - }, - "Fast 3G": { - download: ((1.6 * 1000 * 1000) / 8) * 0.9, - upload: ((750 * 1000) / 8) * 0.9, - latency: 150 * 3.75, - }, -}; -//# sourceMappingURL=NetworkConditions.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/NetworkManager.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/NetworkManager.d.ts deleted file mode 100644 index 86557e09c03..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/NetworkManager.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { EventEmitter } from "./EventEmitter.js"; -import { Protocol } from "../../vendor/devtools-protocol/types/protocol.d.ts"; -import { CDPSession } from "./Connection.js"; -import { FrameManager } from "./FrameManager.js"; -import { HTTPRequest } from "./HTTPRequest.js"; -/** - * @public - */ -export interface Credentials { - username: string; - password: string; -} -/** - * @public - */ -export interface NetworkConditions { - download: number; - upload: number; - latency: number; -} -/** - * @public - */ -export interface InternalNetworkConditions extends NetworkConditions { - offline: boolean; -} -/** - * We use symbols to prevent any external parties listening to these events. - * They are internal to Puppeteer. - * - * @internal - */ -export declare const NetworkManagerEmittedEvents: { - readonly Request: symbol; - readonly RequestServedFromCache: symbol; - readonly Response: symbol; - readonly RequestFailed: symbol; - readonly RequestFinished: symbol; -}; -/** - * @internal - */ -export declare class NetworkManager extends EventEmitter { - _client: CDPSession; - _ignoreHTTPSErrors: boolean; - _frameManager: FrameManager; - _requestIdToRequest: Map; - _requestIdToRequestWillBeSentEvent: Map< - string, - Protocol.Network.RequestWillBeSentEvent - >; - _extraHTTPHeaders: Record; - _credentials?: Credentials; - _attemptedAuthentications: Set; - _userRequestInterceptionEnabled: boolean; - _userRequestInterceptionCacheSafe: boolean; - _protocolRequestInterceptionEnabled: boolean; - _userCacheDisabled: boolean; - _requestIdToInterceptionId: Map; - _emulatedNetworkConditions: InternalNetworkConditions; - constructor( - client: CDPSession, - ignoreHTTPSErrors: boolean, - frameManager: FrameManager, - ); - initialize(): Promise; - authenticate(credentials?: Credentials): Promise; - setExtraHTTPHeaders(extraHTTPHeaders: Record): Promise; - extraHTTPHeaders(): Record; - setOfflineMode(value: boolean): Promise; - emulateNetworkConditions( - networkConditions: NetworkConditions | null, - ): Promise; - _updateNetworkConditions(): Promise; - setUserAgent(userAgent: string): Promise; - setCacheEnabled(enabled: boolean): Promise; - setRequestInterception(value: boolean, cacheSafe?: boolean): Promise; - _updateProtocolRequestInterception(): Promise; - _updateProtocolCacheDisabled(): Promise; - _onRequestWillBeSent(event: Protocol.Network.RequestWillBeSentEvent): void; - _onAuthRequired(event: Protocol.Fetch.AuthRequiredEvent): void; - _onRequestPaused(event: Protocol.Fetch.RequestPausedEvent): void; - _onRequest( - event: Protocol.Network.RequestWillBeSentEvent, - interceptionId?: string, - ): void; - _onRequestServedFromCache( - event: Protocol.Network.RequestServedFromCacheEvent, - ): void; - _handleRequestRedirect( - request: HTTPRequest, - responsePayload: Protocol.Network.Response, - ): void; - _onResponseReceived(event: Protocol.Network.ResponseReceivedEvent): void; - _onLoadingFinished(event: Protocol.Network.LoadingFinishedEvent): void; - _onLoadingFailed(event: Protocol.Network.LoadingFailedEvent): void; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/NetworkManager.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/NetworkManager.js deleted file mode 100644 index fa5e40f6157..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/NetworkManager.js +++ /dev/null @@ -1,319 +0,0 @@ -/// -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { EventEmitter } from "./EventEmitter.js"; -import { assert } from "./assert.js"; -import { debugError, helper } from "./helper.js"; -import { HTTPRequest } from "./HTTPRequest.js"; -import { HTTPResponse } from "./HTTPResponse.js"; -/** - * We use symbols to prevent any external parties listening to these events. - * They are internal to Puppeteer. - * - * @internal - */ -export const NetworkManagerEmittedEvents = { - Request: Symbol("NetworkManager.Request"), - RequestServedFromCache: Symbol("NetworkManager.RequestServedFromCache"), - Response: Symbol("NetworkManager.Response"), - RequestFailed: Symbol("NetworkManager.RequestFailed"), - RequestFinished: Symbol("NetworkManager.RequestFinished"), -}; -/** - * @internal - */ -export class NetworkManager extends EventEmitter { - constructor(client, ignoreHTTPSErrors, frameManager) { - super(); - this._requestIdToRequest = new Map(); - this._requestIdToRequestWillBeSentEvent = new Map(); - this._extraHTTPHeaders = {}; - this._credentials = null; - this._attemptedAuthentications = new Set(); - this._userRequestInterceptionEnabled = false; - this._userRequestInterceptionCacheSafe = false; - this._protocolRequestInterceptionEnabled = false; - this._userCacheDisabled = false; - this._requestIdToInterceptionId = new Map(); - this._emulatedNetworkConditions = { - offline: false, - upload: -1, - download: -1, - latency: 0, - }; - this._client = client; - this._ignoreHTTPSErrors = ignoreHTTPSErrors; - this._frameManager = frameManager; - this._client.on("Fetch.requestPaused", this._onRequestPaused.bind(this)); - this._client.on("Fetch.authRequired", this._onAuthRequired.bind(this)); - this._client.on( - "Network.requestWillBeSent", - this._onRequestWillBeSent.bind(this), - ); - this._client.on( - "Network.requestServedFromCache", - this._onRequestServedFromCache.bind(this), - ); - this._client.on( - "Network.responseReceived", - this._onResponseReceived.bind(this), - ); - this._client.on( - "Network.loadingFinished", - this._onLoadingFinished.bind(this), - ); - this._client.on("Network.loadingFailed", this._onLoadingFailed.bind(this)); - } - async initialize() { - await this._client.send("Network.enable"); - if (this._ignoreHTTPSErrors) { - await this._client.send("Security.setIgnoreCertificateErrors", { - ignore: true, - }); - } - } - async authenticate(credentials) { - this._credentials = credentials; - await this._updateProtocolRequestInterception(); - } - async setExtraHTTPHeaders(extraHTTPHeaders) { - this._extraHTTPHeaders = {}; - for (const key of Object.keys(extraHTTPHeaders)) { - const value = extraHTTPHeaders[key]; - assert( - helper.isString(value), - `Expected value of header "${key}" to be String, but "${typeof value}" is found.`, - ); - this._extraHTTPHeaders[key.toLowerCase()] = value; - } - await this._client.send("Network.setExtraHTTPHeaders", { - headers: this._extraHTTPHeaders, - }); - } - extraHTTPHeaders() { - return Object.assign({}, this._extraHTTPHeaders); - } - async setOfflineMode(value) { - this._emulatedNetworkConditions.offline = value; - await this._updateNetworkConditions(); - } - async emulateNetworkConditions(networkConditions) { - this._emulatedNetworkConditions.upload = networkConditions - ? networkConditions.upload - : -1; - this._emulatedNetworkConditions.download = networkConditions - ? networkConditions.download - : -1; - this._emulatedNetworkConditions.latency = networkConditions - ? networkConditions.latency - : 0; - await this._updateNetworkConditions(); - } - async _updateNetworkConditions() { - await this._client.send("Network.emulateNetworkConditions", { - offline: this._emulatedNetworkConditions.offline, - latency: this._emulatedNetworkConditions.latency, - uploadThroughput: this._emulatedNetworkConditions.upload, - downloadThroughput: this._emulatedNetworkConditions.download, - }); - } - async setUserAgent(userAgent) { - await this._client.send("Network.setUserAgentOverride", { userAgent }); - } - async setCacheEnabled(enabled) { - this._userCacheDisabled = !enabled; - await this._updateProtocolCacheDisabled(); - } - async setRequestInterception(value, cacheSafe = false) { - this._userRequestInterceptionEnabled = value; - this._userRequestInterceptionCacheSafe = cacheSafe; - await this._updateProtocolRequestInterception(); - } - async _updateProtocolRequestInterception() { - const enabled = this._userRequestInterceptionEnabled || !!this._credentials; - if (enabled === this._protocolRequestInterceptionEnabled) { - return; - } - this._protocolRequestInterceptionEnabled = enabled; - if (enabled) { - await Promise.all([ - this._updateProtocolCacheDisabled(), - this._client.send("Fetch.enable", { - handleAuthRequests: true, - patterns: [{ urlPattern: "*" }], - }), - ]); - } else { - await Promise.all([ - this._updateProtocolCacheDisabled(), - this._client.send("Fetch.disable"), - ]); - } - } - async _updateProtocolCacheDisabled() { - await this._client.send("Network.setCacheDisabled", { - cacheDisabled: this._userCacheDisabled || - (this._userRequestInterceptionEnabled && - !this._userRequestInterceptionCacheSafe), - }); - } - _onRequestWillBeSent(event) { - // Request interception doesn't happen for data URLs with Network Service. - if ( - this._userRequestInterceptionEnabled && - !event.request.url.startsWith("data:") - ) { - const requestId = event.requestId; - const interceptionId = this._requestIdToInterceptionId.get(requestId); - if (interceptionId) { - this._onRequest(event, interceptionId); - this._requestIdToInterceptionId.delete(requestId); - } else { - this._requestIdToRequestWillBeSentEvent.set(event.requestId, event); - } - return; - } - this._onRequest(event, null); - } - _onAuthRequired(event) { - let response = "Default"; - if (this._attemptedAuthentications.has(event.requestId)) { - response = "CancelAuth"; - } else if (this._credentials) { - response = "ProvideCredentials"; - this._attemptedAuthentications.add(event.requestId); - } - const { username, password } = this._credentials || { - username: undefined, - password: undefined, - }; - this._client - .send("Fetch.continueWithAuth", { - requestId: event.requestId, - authChallengeResponse: { response, username, password }, - }) - .catch(debugError); - } - _onRequestPaused(event) { - if ( - !this._userRequestInterceptionEnabled && - this._protocolRequestInterceptionEnabled - ) { - this._client - .send("Fetch.continueRequest", { - requestId: event.requestId, - }) - .catch(debugError); - } - const requestId = event.networkId; - const interceptionId = event.requestId; - if (requestId && this._requestIdToRequestWillBeSentEvent.has(requestId)) { - const requestWillBeSentEvent = this._requestIdToRequestWillBeSentEvent - .get(requestId); - this._onRequest(requestWillBeSentEvent, interceptionId); - this._requestIdToRequestWillBeSentEvent.delete(requestId); - } else { - this._requestIdToInterceptionId.set(requestId, interceptionId); - } - } - _onRequest(event, interceptionId) { - let redirectChain = []; - if (event.redirectResponse) { - const request = this._requestIdToRequest.get(event.requestId); - // If we connect late to the target, we could have missed the - // requestWillBeSent event. - if (request) { - this._handleRequestRedirect(request, event.redirectResponse); - redirectChain = request._redirectChain; - } - } - const frame = event.frameId - ? this._frameManager.frame(event.frameId) - : null; - const request = new HTTPRequest( - this._client, - frame, - interceptionId, - this._userRequestInterceptionEnabled, - event, - redirectChain, - ); - this._requestIdToRequest.set(event.requestId, request); - this.emit(NetworkManagerEmittedEvents.Request, request); - } - _onRequestServedFromCache(event) { - const request = this._requestIdToRequest.get(event.requestId); - if (request) { - request._fromMemoryCache = true; - } - this.emit(NetworkManagerEmittedEvents.RequestServedFromCache, request); - } - _handleRequestRedirect(request, responsePayload) { - const response = new HTTPResponse(this._client, request, responsePayload); - request._response = response; - request._redirectChain.push(request); - response._resolveBody( - new Error("Response body is unavailable for redirect responses"), - ); - this._requestIdToRequest.delete(request._requestId); - this._attemptedAuthentications.delete(request._interceptionId); - this.emit(NetworkManagerEmittedEvents.Response, response); - this.emit(NetworkManagerEmittedEvents.RequestFinished, request); - } - _onResponseReceived(event) { - const request = this._requestIdToRequest.get(event.requestId); - // FileUpload sends a response without a matching request. - if (!request) { - return; - } - const response = new HTTPResponse(this._client, request, event.response); - request._response = response; - this.emit(NetworkManagerEmittedEvents.Response, response); - } - _onLoadingFinished(event) { - const request = this._requestIdToRequest.get(event.requestId); - // For certain requestIds we never receive requestWillBeSent event. - // @see https://crbug.com/750469 - if (!request) { - return; - } - // Under certain conditions we never get the Network.responseReceived - // event from protocol. @see https://crbug.com/883475 - if (request.response()) { - request.response()._resolveBody(null); - } - this._requestIdToRequest.delete(request._requestId); - this._attemptedAuthentications.delete(request._interceptionId); - this.emit(NetworkManagerEmittedEvents.RequestFinished, request); - } - _onLoadingFailed(event) { - const request = this._requestIdToRequest.get(event.requestId); - // For certain requestIds we never receive requestWillBeSent event. - // @see https://crbug.com/750469 - if (!request) { - return; - } - request._failureText = event.errorText; - const response = request.response(); - if (response) { - response._resolveBody(null); - } - this._requestIdToRequest.delete(request._requestId); - this._attemptedAuthentications.delete(request._interceptionId); - this.emit(NetworkManagerEmittedEvents.RequestFailed, request); - } -} -//# sourceMappingURL=NetworkManager.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/PDFOptions.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/PDFOptions.d.ts deleted file mode 100644 index 9cefbbe852a..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/PDFOptions.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @public - */ -export interface PDFMargin { - top?: string | number; - bottom?: string | number; - left?: string | number; - right?: string | number; -} -/** - * All the valid paper format types when printing a PDF. - * - * @remarks - * - * The sizes of each format are as follows: - * - `Letter`: 8.5in x 11in - * - * - `Legal`: 8.5in x 14in - * - * - `Tabloid`: 11in x 17in - * - * - `Ledger`: 17in x 11in - * - * - `A0`: 33.1in x 46.8in - * - * - `A1`: 23.4in x 33.1in - * - * - `A2`: 16.54in x 23.4in - * - * - `A3`: 11.7in x 16.54in - * - * - `A4`: 8.27in x 11.7in - * - * - `A5`: 5.83in x 8.27in - * - * - `A6`: 4.13in x 5.83in - * - * @public - */ -export declare type PaperFormat = - | "letter" - | "legal" - | "tabloid" - | "ledger" - | "a0" - | "a1" - | "a2" - | "a3" - | "a4" - | "a5" - | "a6"; -/** - * Valid options to configure PDF generation via {@link Page.pdf}. - * @public - */ -export interface PDFOptions { - /** - * Scales the rendering of the web page. Amount must be between `0.1` and `2`. - * @defaultValue 1 - */ - scale?: number; - /** - * Whether to show the header and footer. - * @defaultValue false - */ - displayHeaderFooter?: boolean; - /** - * HTML template for the print header. Should be valid HTML with the following - * classes used to inject values into them: - * - `date` formatted print date - * - * - `title` document title - * - * - `url` document location - * - * - `pageNumber` current page number - * - * - `totalPages` total pages in the document - */ - headerTemplate?: string; - /** - * HTML template for the print footer. Has the same constraints and support - * for special classes as {@link PDFOptions.headerTemplate}. - */ - footerTemplate?: string; - /** - * Set to `true` to print background graphics. - * @defaultValue false - */ - printBackground?: boolean; - /** - * Whether to print in landscape orientation. - * @defaultValue = false - */ - landscape?: boolean; - /** - * Paper ranges to print, e.g. `1-5, 8, 11-13`. - * @defaultValue The empty string, which means all pages are printed. - */ - pageRanges?: string; - /** - * @remarks - * If set, this takes priority over the `width` and `height` options. - * @defaultValue `letter`. - */ - format?: PaperFormat; - /** - * Sets the width of paper. You can pass in a number or a string with a unit. - */ - width?: string | number; - /** - * Sets the height of paper. You can pass in a number or a string with a unit. - */ - height?: string | number; - /** - * Give any CSS `@page` size declared in the page priority over what is - * declared in the `width` or `height` or `format` option. - * @defaultValue `false`, which will scale the content to fit the paper size. - */ - preferCSSPageSize?: boolean; - /** - * Set the PDF margins. - * @defaultValue no margins are set. - */ - margin?: PDFMargin; - /** - * The path to save the file to. - * - * @remarks - * - * If the path is relative, it's resolved relative to the current working directory. - * - * @defaultValue the empty string, which means the PDF will not be written to disk. - */ - path?: string; - /** - * Hides default white background and allows generating pdfs with transparency. - * @defaultValue false - */ - omitBackground?: boolean; -} -/** - * @internal - */ -export interface PaperFormatDimensions { - width: number; - height: number; -} -/** - * @internal - */ -export declare const paperFormats: Record; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/PDFOptions.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/PDFOptions.js deleted file mode 100644 index 11663986db1..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/PDFOptions.js +++ /dev/null @@ -1,33 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @internal - */ -export const paperFormats = { - letter: { width: 8.5, height: 11 }, - legal: { width: 8.5, height: 14 }, - tabloid: { width: 11, height: 17 }, - ledger: { width: 17, height: 11 }, - a0: { width: 33.1, height: 46.8 }, - a1: { width: 23.4, height: 33.1 }, - a2: { width: 16.54, height: 23.4 }, - a3: { width: 11.7, height: 16.54 }, - a4: { width: 8.27, height: 11.7 }, - a5: { width: 5.83, height: 8.27 }, - a6: { width: 4.13, height: 5.83 }, -}; -//# sourceMappingURL=PDFOptions.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Page.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Page.d.ts deleted file mode 100644 index a0339290e05..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Page.d.ts +++ /dev/null @@ -1,1059 +0,0 @@ -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { EventEmitter } from "./EventEmitter.js"; -import { CDPSession } from "./Connection.js"; -import { Dialog } from "./Dialog.js"; -import { Frame } from "./FrameManager.js"; -import { Keyboard, Mouse, MouseButton, Touchscreen } from "./Input.js"; -import { Tracing } from "./Tracing.js"; -import { Coverage } from "./Coverage.js"; -import { WebWorker } from "./WebWorker.js"; -import { Browser, BrowserContext } from "./Browser.js"; -import { Target } from "./Target.js"; -import { ElementHandle, JSHandle } from "./JSHandle.js"; -import { Viewport } from "./PuppeteerViewport.js"; -import { Credentials, NetworkConditions } from "./NetworkManager.js"; -import { HTTPRequest } from "./HTTPRequest.js"; -import { HTTPResponse } from "./HTTPResponse.js"; -import { Accessibility } from "./Accessibility.js"; -import { FileChooser } from "./FileChooser.js"; -import { ConsoleMessage } from "./ConsoleMessage.js"; -import { PuppeteerLifeCycleEvent } from "./LifecycleWatcher.js"; -import { Protocol } from "../../vendor/devtools-protocol/types/protocol.d.ts"; -import { - EvaluateFn, - EvaluateFnReturnType, - EvaluateHandleFn, - SerializableOrJSHandle, - UnwrapPromiseLike, - WrapElementHandle, -} from "./EvalTypes.js"; -import { PDFOptions } from "./PDFOptions.js"; -/** - * @public - */ -export interface Metrics { - Timestamp?: number; - Documents?: number; - Frames?: number; - JSEventListeners?: number; - Nodes?: number; - LayoutCount?: number; - RecalcStyleCount?: number; - LayoutDuration?: number; - RecalcStyleDuration?: number; - ScriptDuration?: number; - TaskDuration?: number; - JSHeapUsedSize?: number; - JSHeapTotalSize?: number; -} -/** - * @public - */ -export interface WaitTimeoutOptions { - /** - * Maximum wait time in milliseconds, defaults to 30 seconds, pass `0` to - * disable the timeout. - * - * @remarks - * The default value can be changed by using the - * {@link Page.setDefaultTimeout} method. - */ - timeout?: number; -} -/** - * @public - */ -export interface WaitForOptions { - /** - * Maximum wait time in milliseconds, defaults to 30 seconds, pass `0` to - * disable the timeout. - * - * @remarks - * The default value can be changed by using the - * {@link Page.setDefaultTimeout} or {@link Page.setDefaultNavigationTimeout} - * methods. - */ - timeout?: number; - waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[]; -} -/** - * @public - */ -export interface GeolocationOptions { - /** - * Latitude between -90 and 90. - */ - longitude: number; - /** - * Longitude between -180 and 180. - */ - latitude: number; - /** - * Optional non-negative accuracy value. - */ - accuracy?: number; -} -/** - * @public - */ -export interface MediaFeature { - name: string; - value: string; -} -/** - * @public - */ -export interface ScreenshotClip { - x: number; - y: number; - width: number; - height: number; -} -/** - * @public - */ -export interface ScreenshotOptions { - /** - * @defaultValue 'png' - */ - type?: "png" | "jpeg"; - /** - * The file path to save the image to. The screenshot type will be inferred - * from file extension. If path is a relative path, then it is resolved - * relative to current working directory. If no path is provided, the image - * won't be saved to the disk. - */ - path?: string; - /** - * When true, takes a screenshot of the full page. - * @defaultValue false - */ - fullPage?: boolean; - /** - * An object which specifies the clipping region of the page. - */ - clip?: ScreenshotClip; - /** - * Quality of the image, between 0-100. Not applicable to `png` images. - */ - quality?: number; - /** - * Hides default white background and allows capturing screenshots with transparency. - * @defaultValue false - */ - omitBackground?: boolean; - /** - * Encoding of the image. - * @defaultValue 'binary' - */ - encoding?: "base64" | "binary"; - /** - * If you need a screenshot bigger than the Viewport - * @defaultValue true - */ - captureBeyondViewport?: boolean; -} -/** - * All the events that a page instance may emit. - * - * @public - */ -export declare const enum PageEmittedEvents { - /** Emitted when the page closes. */ - Close = "close", - /** - * Emitted when JavaScript within the page calls one of console API methods, - * e.g. `console.log` or `console.dir`. Also emitted if the page throws an - * error or a warning. - * - * @remarks - * - * A `console` event provides a {@link ConsoleMessage} representing the - * console message that was logged. - * - * @example - * An example of handling `console` event: - * ```js - * page.on('console', msg => { - * for (let i = 0; i < msg.args().length; ++i) - * console.log(`${i}: ${msg.args()[i]}`); - * }); - * page.evaluate(() => console.log('hello', 5, {foo: 'bar'})); - * ``` - */ - Console = "console", - /** - * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, - * `confirm` or `beforeunload`. Puppeteer can respond to the dialog via - * {@link Dialog.accept} or {@link Dialog.dismiss}. - */ - Dialog = "dialog", - /** - * Emitted when the JavaScript - * {@link https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded | DOMContentLoaded } event is dispatched. - */ - DOMContentLoaded = "domcontentloaded", - /** - * Emitted when the page crashes. Will contain an `Error`. - */ - Error = "error", - /** Emitted when a frame is attached. Will contain a {@link Frame}. */ - FrameAttached = "frameattached", - /** Emitted when a frame is detached. Will contain a {@link Frame}. */ - FrameDetached = "framedetached", - /** Emitted when a frame is navigated to a new URL. Will contain a {@link Frame}. */ - FrameNavigated = "framenavigated", - /** - * Emitted when the JavaScript - * {@link https://developer.mozilla.org/en-US/docs/Web/Events/load | load} - * event is dispatched. - */ - Load = "load", - /** - * Emitted when the JavaScript code makes a call to `console.timeStamp`. For - * the list of metrics see {@link Page.metrics | page.metrics}. - * - * @remarks - * Contains an object with two properties: - * - `title`: the title passed to `console.timeStamp` - * - `metrics`: objec containing metrics as key/value pairs. The values will - * be `number`s. - */ - Metrics = "metrics", - /** - * Emitted when an uncaught exception happens within the page. - * Contains an `Error`. - */ - PageError = "pageerror", - /** - * Emitted when the page opens a new tab or window. - * - * Contains a {@link Page} corresponding to the popup window. - * - * @example - * - * ```js - * const [popup] = await Promise.all([ - * new Promise(resolve => page.once('popup', resolve)), - * page.click('a[target=_blank]'), - * ]); - * ``` - * - * ```js - * const [popup] = await Promise.all([ - * new Promise(resolve => page.once('popup', resolve)), - * page.evaluate(() => window.open('https://example.com')), - * ]); - * ``` - */ - Popup = "popup", - /** - * Emitted when a page issues a request and contains a {@link HTTPRequest}. - * - * @remarks - * The object is readonly. See {@link Page.setRequestInterception} for intercepting - * and mutating requests. - */ - Request = "request", - /** - * Emitted when a request ended up loading from cache. Contains a {@link HTTPRequest}. - * - * @remarks - * For certain requests, might contain undefined. - * {@link https://crbug.com/750469} - */ - RequestServedFromCache = "requestservedfromcache", - /** - * Emitted when a request fails, for example by timing out. - * - * Contains a {@link HTTPRequest}. - * - * @remarks - * - * NOTE: HTTP Error responses, such as 404 or 503, are still successful - * responses from HTTP standpoint, so request will complete with - * `requestfinished` event and not with `requestfailed`. - */ - RequestFailed = "requestfailed", - /** - * Emitted when a request finishes successfully. Contains a {@link HTTPRequest}. - */ - RequestFinished = "requestfinished", - /** - * Emitted when a response is received. Contains a {@link HTTPResponse}. - */ - Response = "response", - /** - * Emitted when a dedicated - * {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorker} - * is spawned by the page. - */ - WorkerCreated = "workercreated", - /** - * Emitted when a dedicated - * {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorker} - * is destroyed by the page. - */ - WorkerDestroyed = "workerdestroyed", -} -/** - * Denotes the objects received by callback functions for page events. - * - * See {@link PageEmittedEvents} for more detail on the events and when they are - * emitted. - * @public - */ -export interface PageEventObject { - close: never; - console: ConsoleMessage; - dialog: Dialog; - domcontentloaded: never; - error: Error; - frameattached: Frame; - framedetached: Frame; - framenavigated: Frame; - load: never; - metrics: { - title: string; - metrics: Metrics; - }; - pageerror: Error; - popup: Page; - request: HTTPRequest; - response: HTTPResponse; - requestfailed: HTTPRequest; - requestfinished: HTTPRequest; - requestservedfromcache: HTTPRequest; - workercreated: WebWorker; - workerdestroyed: WebWorker; -} -/** - * Page provides methods to interact with a single tab or - * {@link https://developer.chrome.com/extensions/background_pages | extension background page} in Chromium. - * - * @remarks - * - * One Browser instance might have multiple Page instances. - * - * @example - * This example creates a page, navigates it to a URL, and then * saves a screenshot: - * ```js - * const puppeteer = require('puppeteer'); - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.goto('https://example.com'); - * await page.screenshot({path: 'screenshot.png'}); - * await browser.close(); - * })(); - * ``` - * - * The Page class extends from Puppeteer's {@link EventEmitter} class and will - * emit various events which are documented in the {@link PageEmittedEvents} enum. - * - * @example - * This example logs a message for a single page `load` event: - * ```js - * page.once('load', () => console.log('Page loaded!')); - * ``` - * - * To unsubscribe from events use the `off` method: - * - * ```js - * function logRequest(interceptedRequest) { - * console.log('A request was made:', interceptedRequest.url()); - * } - * page.on('request', logRequest); - * // Sometime later... - * page.off('request', logRequest); - * ``` - * @public - */ -export declare class Page extends EventEmitter { - /** - * @internal - */ - static create( - client: CDPSession, - target: Target, - ignoreHTTPSErrors: boolean, - defaultViewport: Viewport | null, - ): Promise; - private _closed; - private _client; - private _target; - private _keyboard; - private _mouse; - private _timeoutSettings; - private _touchscreen; - private _accessibility; - private _frameManager; - private _emulationManager; - private _tracing; - private _pageBindings; - private _coverage; - private _javascriptEnabled; - private _viewport; - private _screenshotTaskQueue; - private _workers; - private _fileChooserInterceptors; - private _disconnectPromise?; - /** - * @internal - */ - constructor(client: CDPSession, target: Target, ignoreHTTPSErrors: boolean); - private _initialize; - private _onFileChooser; - /** - * @returns `true` if the page has JavaScript enabled, `false` otherwise. - */ - isJavaScriptEnabled(): boolean; - /** - * Listen to page events. - */ - on( - eventName: K, - handler: (event: PageEventObject[K]) => void, - ): EventEmitter; - once( - eventName: K, - handler: (event: PageEventObject[K]) => void, - ): EventEmitter; - /** - * @param options - Optional waiting parameters - * @returns Resolves after a page requests a file picker. - */ - waitForFileChooser(options?: WaitTimeoutOptions): Promise; - /** - * Sets the page's geolocation. - * - * @remarks - * Consider using {@link BrowserContext.overridePermissions} to grant - * permissions for the page to read its geolocation. - * - * @example - * ```js - * await page.setGeolocation({latitude: 59.95, longitude: 30.31667}); - * ``` - */ - setGeolocation(options: GeolocationOptions): Promise; - /** - * @returns A target this page was created from. - */ - target(): Target; - /** - * @returns The browser this page belongs to. - */ - browser(): Browser; - /** - * @returns The browser context that the page belongs to - */ - browserContext(): BrowserContext; - private _onTargetCrashed; - private _onLogEntryAdded; - /** - * @returns The page's main frame. - */ - mainFrame(): Frame; - get keyboard(): Keyboard; - get touchscreen(): Touchscreen; - get coverage(): Coverage; - get tracing(): Tracing; - get accessibility(): Accessibility; - /** - * @returns An array of all frames attached to the page. - */ - frames(): Frame[]; - /** - * @returns all of the dedicated - * {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorkers} - * associated with the page. - */ - workers(): WebWorker[]; - /** - * @param value - Whether to enable request interception. - * @param cacheSafe - Whether to trust browser caching. If set to false, - * enabling request interception disables page caching. Defaults to false. - * - * @remarks - * Activating request interception enables {@link HTTPRequest.abort}, - * {@link HTTPRequest.continue} and {@link HTTPRequest.respond} methods. This - * provides the capability to modify network requests that are made by a page. - * - * Once request interception is enabled, every request will stall unless it's - * continued, responded or aborted; or completed using the browser cache. - * - * @example - * An example of a naïve request interceptor that aborts all image requests: - * ```js - * const puppeteer = require('puppeteer'); - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.setRequestInterception(true); - * page.on('request', interceptedRequest => { - * if (interceptedRequest.url().endsWith('.png') || - * interceptedRequest.url().endsWith('.jpg')) - * interceptedRequest.abort(); - * else - * interceptedRequest.continue(); - * }); - * await page.goto('https://example.com'); - * await browser.close(); - * })(); - * ``` - */ - setRequestInterception(value: boolean, cacheSafe?: boolean): Promise; - /** - * @param enabled - When `true`, enables offline mode for the page. - */ - setOfflineMode(enabled: boolean): Promise; - emulateNetworkConditions( - networkConditions: NetworkConditions | null, - ): Promise; - /** - * @param timeout - Maximum navigation time in milliseconds. - */ - setDefaultNavigationTimeout(timeout: number): void; - /** - * @param timeout - Maximum time in milliseconds. - */ - setDefaultTimeout(timeout: number): void; - /** - * Runs `document.querySelector` within the page. If no element matches the - * selector, the return value resolves to `null`. - * - * @remarks - * Shortcut for {@link Frame.$ | Page.mainFrame().$(selector) }. - * - * @param selector - A - * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector} - * to query page for. - */ - $(selector: string): Promise | null>; - /** - * @remarks - * - * The only difference between {@link Page.evaluate | page.evaluate} and - * `page.evaluateHandle` is that `evaluateHandle` will return the value - * wrapped in an in-page object. - * - * If the function passed to `page.evaluteHandle` returns a Promise, the - * function will wait for the promise to resolve and return its value. - * - * You can pass a string instead of a function (although functions are - * recommended as they are easier to debug and use with TypeScript): - * - * @example - * ``` - * const aHandle = await page.evaluateHandle('document') - * ``` - * - * @example - * {@link JSHandle} instances can be passed as arguments to the `pageFunction`: - * ``` - * const aHandle = await page.evaluateHandle(() => document.body); - * const resultHandle = await page.evaluateHandle(body => body.innerHTML, aHandle); - * console.log(await resultHandle.jsonValue()); - * await resultHandle.dispose(); - * ``` - * - * Most of the time this function returns a {@link JSHandle}, - * but if `pageFunction` returns a reference to an element, - * you instead get an {@link ElementHandle} back: - * - * @example - * ``` - * const button = await page.evaluateHandle(() => document.querySelector('button')); - * // can call `click` because `button` is an `ElementHandle` - * await button.click(); - * ``` - * - * The TypeScript definitions assume that `evaluateHandle` returns - * a `JSHandle`, but if you know it's going to return an - * `ElementHandle`, pass it as the generic argument: - * - * ``` - * const button = await page.evaluateHandle(...); - * ``` - * - * @param pageFunction - a function that is run within the page - * @param args - arguments to be passed to the pageFunction - */ - evaluateHandle( - pageFunction: EvaluateHandleFn, - ...args: SerializableOrJSHandle[] - ): Promise; - /** - * This method iterates the JavaScript heap and finds all objects with the - * given prototype. - * - * @remarks - * - * @example - * - * ```js - * // Create a Map object - * await page.evaluate(() => window.map = new Map()); - * // Get a handle to the Map object prototype - * const mapPrototype = await page.evaluateHandle(() => Map.prototype); - * // Query all map instances into an array - * const mapInstances = await page.queryObjects(mapPrototype); - * // Count amount of map objects in heap - * const count = await page.evaluate(maps => maps.length, mapInstances); - * await mapInstances.dispose(); - * await mapPrototype.dispose(); - * ``` - * @param prototypeHandle - a handle to the object prototype. - */ - queryObjects(prototypeHandle: JSHandle): Promise; - /** - * This method runs `document.querySelector` within the page and passes the - * result as the first argument to the `pageFunction`. - * - * @remarks - * - * If no element is found matching `selector`, the method will throw an error. - * - * If `pageFunction` returns a promise `$eval` will wait for the promise to - * resolve and then return its value. - * - * @example - * - * ``` - * const searchValue = await page.$eval('#search', el => el.value); - * const preloadHref = await page.$eval('link[rel=preload]', el => el.href); - * const html = await page.$eval('.main-container', el => el.outerHTML); - * ``` - * - * If you are using TypeScript, you may have to provide an explicit type to the - * first argument of the `pageFunction`. - * By default it is typed as `Element`, but you may need to provide a more - * specific sub-type: - * - * @example - * - * ``` - * // if you don't provide HTMLInputElement here, TS will error - * // as `value` is not on `Element` - * const searchValue = await page.$eval('#search', (el: HTMLInputElement) => el.value); - * ``` - * - * The compiler should be able to infer the return type - * from the `pageFunction` you provide. If it is unable to, you can use the generic - * type to tell the compiler what return type you expect from `$eval`: - * - * @example - * - * ``` - * // The compiler can infer the return type in this case, but if it can't - * // or if you want to be more explicit, provide it as the generic type. - * const searchValue = await page.$eval( - * '#search', (el: HTMLInputElement) => el.value - * ); - * ``` - * - * @param selector - the - * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector} - * to query for - * @param pageFunction - the function to be evaluated in the page context. - * Will be passed the result of `document.querySelector(selector)` as its - * first argument. - * @param args - any additional arguments to pass through to `pageFunction`. - * - * @returns The result of calling `pageFunction`. If it returns an element it - * is wrapped in an {@link ElementHandle}, else the raw value itself is - * returned. - */ - $eval( - selector: string, - pageFunction: ( - element: any, - ...args: unknown[] - ) => ReturnType | Promise, - ...args: SerializableOrJSHandle[] - ): Promise>; - /** - * This method runs `Array.from(document.querySelectorAll(selector))` within - * the page and passes the result as the first argument to the `pageFunction`. - * - * @remarks - * - * If `pageFunction` returns a promise `$$eval` will wait for the promise to - * resolve and then return its value. - * - * @example - * - * ``` - * // get the amount of divs on the page - * const divCount = await page.$$eval('div', divs => divs.length); - * - * // get the text content of all the `.options` elements: - * const options = await page.$$eval('div > span.options', options => { - * return options.map(option => option.textContent) - * }); - * ``` - * - * If you are using TypeScript, you may have to provide an explicit type to the - * first argument of the `pageFunction`. - * By default it is typed as `Element[]`, but you may need to provide a more - * specific sub-type: - * - * @example - * - * ``` - * // if you don't provide HTMLInputElement here, TS will error - * // as `value` is not on `Element` - * await page.$$eval('input', (elements: HTMLInputElement[]) => { - * return elements.map(e => e.value); - * }); - * ``` - * - * The compiler should be able to infer the return type - * from the `pageFunction` you provide. If it is unable to, you can use the generic - * type to tell the compiler what return type you expect from `$$eval`: - * - * @example - * - * ``` - * // The compiler can infer the return type in this case, but if it can't - * // or if you want to be more explicit, provide it as the generic type. - * const allInputValues = await page.$$eval( - * 'input', (elements: HTMLInputElement[]) => elements.map(e => e.textContent) - * ); - * ``` - * - * @param selector - the - * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector} - * to query for - * @param pageFunction - the function to be evaluated in the page context. Will - * be passed the result of `Array.from(document.querySelectorAll(selector))` - * as its first argument. - * @param args - any additional arguments to pass through to `pageFunction`. - * - * @returns The result of calling `pageFunction`. If it returns an element it - * is wrapped in an {@link ElementHandle}, else the raw value itself is - * returned. - */ - $$eval( - selector: string, - pageFunction: ( - elements: any[], - ...args: unknown[] - ) => ReturnType | Promise, - ...args: SerializableOrJSHandle[] - ): Promise>; - $$(selector: string): Promise>>; - $x(expression: string): Promise; - /** - * If no URLs are specified, this method returns cookies for the current page - * URL. If URLs are specified, only cookies for those URLs are returned. - */ - cookies(...urls: string[]): Promise; - deleteCookie( - ...cookies: Protocol.Network.DeleteCookiesRequest[] - ): Promise; - setCookie(...cookies: Protocol.Network.CookieParam[]): Promise; - addScriptTag(options: { - url?: string; - path?: string; - content?: string; - type?: string; - }): Promise; - addStyleTag(options: { - url?: string; - path?: string; - content?: string; - }): Promise; - exposeFunction(name: string, puppeteerFunction: Function): Promise; - authenticate(credentials: Credentials): Promise; - setExtraHTTPHeaders(headers: Record): Promise; - setUserAgent(userAgent: string): Promise; - metrics(): Promise; - private _emitMetrics; - private _buildMetricsObject; - private _handleException; - private _onConsoleAPI; - private _onBindingCalled; - private _addConsoleMessage; - private _onDialog; - /** - * Resets default white background - */ - private _resetDefaultBackgroundColor; - /** - * Hides default white background - */ - private _setTransparentBackgroundColor; - url(): string; - content(): Promise; - setContent(html: string, options?: WaitForOptions): Promise; - goto( - url: string, - options?: WaitForOptions & { - referer?: string; - }, - ): Promise; - reload(options?: WaitForOptions): Promise; - waitForNavigation(options?: WaitForOptions): Promise; - private _sessionClosePromise; - waitForRequest( - urlOrPredicate: string | ((req: HTTPRequest) => boolean | Promise), - options?: { - timeout?: number; - }, - ): Promise; - waitForResponse( - urlOrPredicate: - | string - | ((res: HTTPResponse) => boolean | Promise), - options?: { - timeout?: number; - }, - ): Promise; - goBack(options?: WaitForOptions): Promise; - goForward(options?: WaitForOptions): Promise; - private _go; - bringToFront(): Promise; - emulate(options: { - viewport: Viewport; - userAgent: string; - }): Promise; - setJavaScriptEnabled(enabled: boolean): Promise; - setBypassCSP(enabled: boolean): Promise; - emulateMediaType(type?: string): Promise; - emulateMediaFeatures(features?: MediaFeature[]): Promise; - emulateTimezone(timezoneId?: string): Promise; - /** - * Emulates the idle state. - * If no arguments set, clears idle state emulation. - * - * @example - * ```js - * // set idle emulation - * await page.emulateIdleState({isUserActive: true, isScreenUnlocked: false}); - * - * // do some checks here - * ... - * - * // clear idle emulation - * await page.emulateIdleState(); - * ``` - * - * @param overrides - Mock idle state. If not set, clears idle overrides - * @param isUserActive - Mock isUserActive - * @param isScreenUnlocked - Mock isScreenUnlocked - */ - emulateIdleState(overrides?: { - isUserActive: boolean; - isScreenUnlocked: boolean; - }): Promise; - /** - * Simulates the given vision deficiency on the page. - * - * @example - * ```js - * const puppeteer = require('puppeteer'); - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.goto('https://v8.dev/blog/10-years'); - * - * await page.emulateVisionDeficiency('achromatopsia'); - * await page.screenshot({ path: 'achromatopsia.png' }); - * - * await page.emulateVisionDeficiency('deuteranopia'); - * await page.screenshot({ path: 'deuteranopia.png' }); - * - * await page.emulateVisionDeficiency('blurredVision'); - * await page.screenshot({ path: 'blurred-vision.png' }); - * - * await browser.close(); - * })(); - * ``` - * - * @param type - the type of deficiency to simulate, or `'none'` to reset. - */ - emulateVisionDeficiency( - type?: Protocol.Emulation.SetEmulatedVisionDeficiencyRequest["type"], - ): Promise; - setViewport(viewport: Viewport): Promise; - viewport(): Viewport | null; - /** - * @remarks - * - * Evaluates a function in the page's context and returns the result. - * - * If the function passed to `page.evaluteHandle` returns a Promise, the - * function will wait for the promise to resolve and return its value. - * - * @example - * - * ```js - * const result = await frame.evaluate(() => { - * return Promise.resolve(8 * 7); - * }); - * console.log(result); // prints "56" - * ``` - * - * You can pass a string instead of a function (although functions are - * recommended as they are easier to debug and use with TypeScript): - * - * @example - * ``` - * const aHandle = await page.evaluate('1 + 2'); - * ``` - * - * To get the best TypeScript experience, you should pass in as the - * generic the type of `pageFunction`: - * - * ``` - * const aHandle = await page.evaluate<() => number>(() => 2); - * ``` - * - * @example - * - * {@link ElementHandle} instances (including {@link JSHandle}s) can be passed - * as arguments to the `pageFunction`: - * - * ``` - * const bodyHandle = await page.$('body'); - * const html = await page.evaluate(body => body.innerHTML, bodyHandle); - * await bodyHandle.dispose(); - * ``` - * - * @param pageFunction - a function that is run within the page - * @param args - arguments to be passed to the pageFunction - * - * @returns the return value of `pageFunction`. - */ - evaluate( - pageFunction: T, - ...args: SerializableOrJSHandle[] - ): Promise>>; - evaluateOnNewDocument( - pageFunction: Function | string, - ...args: unknown[] - ): Promise; - setCacheEnabled(enabled?: boolean): Promise; - screenshot(options?: ScreenshotOptions): Promise; - private _screenshotTask; - /** - * Generatees a PDF of the page with the `print` CSS media type. - * @remarks - * - * IMPORTANT: PDF generation is only supported in Chrome headless mode. - * - * To generate a PDF with the `screen` media type, call - * {@link Page.emulateMediaType | `page.emulateMediaType('screen')`} before - * calling `page.pdf()`. - * - * By default, `page.pdf()` generates a pdf with modified colors for printing. - * Use the - * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-print-color-adjust | `-webkit-print-color-adjust`} - * property to force rendering of exact colors. - * - * - * @param options - options for generating the PDF. - */ - pdf(options?: PDFOptions): Promise; - title(): Promise; - close(options?: { - runBeforeUnload?: boolean; - }): Promise; - isClosed(): boolean; - get mouse(): Mouse; - click(selector: string, options?: { - delay?: number; - button?: MouseButton; - clickCount?: number; - }): Promise; - focus(selector: string): Promise; - hover(selector: string): Promise; - select(selector: string, ...values: string[]): Promise; - tap(selector: string): Promise; - type(selector: string, text: string, options?: { - delay: number; - }): Promise; - /** - * @remarks - * - * This method behaves differently depending on the first parameter. If it's a - * `string`, it will be treated as a `selector` or `xpath` (if the string - * starts with `//`). This method then is a shortcut for - * {@link Page.waitForSelector} or {@link Page.waitForXPath}. - * - * If the first argument is a function this method is a shortcut for - * {@link Page.waitForFunction}. - * - * If the first argument is a `number`, it's treated as a timeout in - * milliseconds and the method returns a promise which resolves after the - * timeout. - * - * @param selectorOrFunctionOrTimeout - a selector, predicate or timeout to - * wait for. - * @param options - optional waiting parameters. - * @param args - arguments to pass to `pageFunction`. - * - * @deprecated Don't use this method directly. Instead use the more explicit - * methods available: {@link Page.waitForSelector}, - * {@link Page.waitForXPath}, {@link Page.waitForFunction} or - * {@link Page.waitForTimeout}. - */ - waitFor(selectorOrFunctionOrTimeout: string | number | Function, options?: { - visible?: boolean; - hidden?: boolean; - timeout?: number; - polling?: string | number; - }, ...args: SerializableOrJSHandle[]): Promise; - /** - * Causes your script to wait for the given number of milliseconds. - * - * @remarks - * - * It's generally recommended to not wait for a number of seconds, but instead - * use {@link Page.waitForSelector}, {@link Page.waitForXPath} or - * {@link Page.waitForFunction} to wait for exactly the conditions you want. - * - * @example - * - * Wait for 1 second: - * - * ``` - * await page.waitForTimeout(1000); - * ``` - * - * @param milliseconds - the number of milliseconds to wait. - */ - waitForTimeout(milliseconds: number): Promise; - waitForSelector(selector: string, options?: { - visible?: boolean; - hidden?: boolean; - timeout?: number; - }): Promise; - waitForXPath(xpath: string, options?: { - visible?: boolean; - hidden?: boolean; - timeout?: number; - }): Promise; - waitForFunction(pageFunction: Function | string, options?: { - timeout?: number; - polling?: string | number; - }, ...args: SerializableOrJSHandle[]): Promise; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Page.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Page.js deleted file mode 100644 index 25745ff895f..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Page.js +++ /dev/null @@ -1,1585 +0,0 @@ -/// -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { EventEmitter } from "./EventEmitter.js"; -import { CDPSessionEmittedEvents, Connection } from "./Connection.js"; -import { Dialog } from "./Dialog.js"; -import { EmulationManager } from "./EmulationManager.js"; -import { FrameManager, FrameManagerEmittedEvents } from "./FrameManager.js"; -import { Keyboard, Mouse, Touchscreen } from "./Input.js"; -import { Tracing } from "./Tracing.js"; -import { assert } from "./assert.js"; -import { debugError, helper } from "./helper.js"; -import { Coverage } from "./Coverage.js"; -import { WebWorker } from "./WebWorker.js"; -import { createJSHandle } from "./JSHandle.js"; -import { NetworkManagerEmittedEvents } from "./NetworkManager.js"; -import { Accessibility } from "./Accessibility.js"; -import { TimeoutSettings } from "./TimeoutSettings.js"; -import { FileChooser } from "./FileChooser.js"; -import { ConsoleMessage } from "./ConsoleMessage.js"; -import { paperFormats } from "./PDFOptions.js"; -import { base64Decode } from "../../vendor/std.ts"; -class ScreenshotTaskQueue { - constructor() { - this._chain = Promise.resolve(undefined); - } - postTask(task) { - const result = this._chain.then(task); - this._chain = result.catch(() => {}); - return result; - } -} -/** - * Page provides methods to interact with a single tab or - * {@link https://developer.chrome.com/extensions/background_pages | extension background page} in Chromium. - * - * @remarks - * - * One Browser instance might have multiple Page instances. - * - * @example - * This example creates a page, navigates it to a URL, and then * saves a screenshot: - * ```js - * const puppeteer = require('puppeteer'); - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.goto('https://example.com'); - * await page.screenshot({path: 'screenshot.png'}); - * await browser.close(); - * })(); - * ``` - * - * The Page class extends from Puppeteer's {@link EventEmitter} class and will - * emit various events which are documented in the {@link PageEmittedEvents} enum. - * - * @example - * This example logs a message for a single page `load` event: - * ```js - * page.once('load', () => console.log('Page loaded!')); - * ``` - * - * To unsubscribe from events use the `off` method: - * - * ```js - * function logRequest(interceptedRequest) { - * console.log('A request was made:', interceptedRequest.url()); - * } - * page.on('request', logRequest); - * // Sometime later... - * page.off('request', logRequest); - * ``` - * @public - */ -export class Page extends EventEmitter { - /** - * @internal - */ - constructor(client, target, ignoreHTTPSErrors) { - super(); - this._closed = false; - this._timeoutSettings = new TimeoutSettings(); - this._pageBindings = new Map(); - this._javascriptEnabled = true; - this._workers = new Map(); - // TODO: improve this typedef - it's a function that takes a file chooser or - // something? - this._fileChooserInterceptors = new Set(); - this._client = client; - this._target = target; - this._keyboard = new Keyboard(client); - this._mouse = new Mouse(client, this._keyboard); - this._touchscreen = new Touchscreen(client, this._keyboard); - this._accessibility = new Accessibility(client); - this._frameManager = new FrameManager( - client, - this, - ignoreHTTPSErrors, - this._timeoutSettings, - ); - this._emulationManager = new EmulationManager(client); - this._tracing = new Tracing(client); - this._coverage = new Coverage(client); - this._screenshotTaskQueue = new ScreenshotTaskQueue(); - this._viewport = null; - client.on("Target.attachedToTarget", (event) => { - if (event.targetInfo.type !== "worker") { - // If we don't detach from service workers, they will never die. - client - .send("Target.detachFromTarget", { - sessionId: event.sessionId, - }) - .catch(debugError); - return; - } - const session = Connection.fromSession(client).session(event.sessionId); - const worker = new WebWorker( - session, - event.targetInfo.url, - this._addConsoleMessage.bind(this), - this._handleException.bind(this), - ); - this._workers.set(event.sessionId, worker); - this.emit("workercreated", /* WorkerCreated */ worker); - }); - client.on("Target.detachedFromTarget", (event) => { - const worker = this._workers.get(event.sessionId); - if (!worker) { - return; - } - this._workers.delete(event.sessionId); - this.emit("workerdestroyed", /* WorkerDestroyed */ worker); - }); - this._frameManager.on( - FrameManagerEmittedEvents.FrameAttached, - (event) => this.emit("frameattached", /* FrameAttached */ event), - ); - this._frameManager.on( - FrameManagerEmittedEvents.FrameDetached, - (event) => this.emit("framedetached", /* FrameDetached */ event), - ); - this._frameManager.on( - FrameManagerEmittedEvents.FrameNavigated, - (event) => this.emit("framenavigated", /* FrameNavigated */ event), - ); - const networkManager = this._frameManager.networkManager(); - networkManager.on( - NetworkManagerEmittedEvents.Request, - (event) => this.emit("request", /* Request */ event), - ); - networkManager.on( - NetworkManagerEmittedEvents.RequestServedFromCache, - (event) => - this.emit("requestservedfromcache", /* RequestServedFromCache */ event), - ); - networkManager.on( - NetworkManagerEmittedEvents.Response, - (event) => this.emit("response", /* Response */ event), - ); - networkManager.on( - NetworkManagerEmittedEvents.RequestFailed, - (event) => this.emit("requestfailed", /* RequestFailed */ event), - ); - networkManager.on( - NetworkManagerEmittedEvents.RequestFinished, - (event) => this.emit("requestfinished", /* RequestFinished */ event), - ); - this._fileChooserInterceptors = new Set(); - client.on( - "Page.domContentEventFired", - () => this.emit("domcontentloaded" /* DOMContentLoaded */), - ); - client.on("Page.loadEventFired", () => this.emit("load" /* Load */)); - client.on("Runtime.consoleAPICalled", (event) => this._onConsoleAPI(event)); - client.on("Runtime.bindingCalled", (event) => this._onBindingCalled(event)); - client.on("Page.javascriptDialogOpening", (event) => this._onDialog(event)); - client.on( - "Runtime.exceptionThrown", - (exception) => this._handleException(exception.exceptionDetails), - ); - client.on("Inspector.targetCrashed", () => this._onTargetCrashed()); - client.on("Performance.metrics", (event) => this._emitMetrics(event)); - client.on("Log.entryAdded", (event) => this._onLogEntryAdded(event)); - client.on("Page.fileChooserOpened", (event) => this._onFileChooser(event)); - this._target._isClosedPromise.then(() => { - this.emit("close" /* Close */); - this._closed = true; - }); - } - /** - * @internal - */ - static async create(client, target, ignoreHTTPSErrors, defaultViewport) { - const page = new Page(client, target, ignoreHTTPSErrors); - await page._initialize(); - if (defaultViewport) { - await page.setViewport(defaultViewport); - } - return page; - } - async _initialize() { - await Promise.all([ - this._frameManager.initialize(), - this._client.send("Target.setAutoAttach", { - autoAttach: true, - waitForDebuggerOnStart: false, - flatten: true, - }), - this._client.send("Performance.enable"), - this._client.send("Log.enable"), - ]); - } - async _onFileChooser(event) { - if (!this._fileChooserInterceptors.size) { - return; - } - const frame = this._frameManager.frame(event.frameId); - const context = await frame.executionContext(); - const element = await context._adoptBackendNodeId(event.backendNodeId); - const interceptors = Array.from(this._fileChooserInterceptors); - this._fileChooserInterceptors.clear(); - const fileChooser = new FileChooser(element, event); - for (const interceptor of interceptors) { - interceptor.call(null, fileChooser); - } - } - /** - * @returns `true` if the page has JavaScript enabled, `false` otherwise. - */ - isJavaScriptEnabled() { - return this._javascriptEnabled; - } - /** - * Listen to page events. - */ - on(eventName, handler) { - // Note: this method only exists to define the types; we delegate the impl - // to EventEmitter. - return super.on(eventName, handler); - } - once(eventName, handler) { - // Note: this method only exists to define the types; we delegate the impl - // to EventEmitter. - return super.once(eventName, handler); - } - /** - * @param options - Optional waiting parameters - * @returns Resolves after a page requests a file picker. - */ - async waitForFileChooser(options = {}) { - if (!this._fileChooserInterceptors.size) { - await this._client.send("Page.setInterceptFileChooserDialog", { - enabled: true, - }); - } - const { timeout = this._timeoutSettings.timeout() } = options; - let callback; - const promise = new Promise((x) => (callback = x)); - this._fileChooserInterceptors.add(callback); - return helper - .waitWithTimeout(promise, "waiting for file chooser", timeout) - .catch((error) => { - this._fileChooserInterceptors.delete(callback); - throw error; - }); - } - /** - * Sets the page's geolocation. - * - * @remarks - * Consider using {@link BrowserContext.overridePermissions} to grant - * permissions for the page to read its geolocation. - * - * @example - * ```js - * await page.setGeolocation({latitude: 59.95, longitude: 30.31667}); - * ``` - */ - async setGeolocation(options) { - const { longitude, latitude, accuracy = 0 } = options; - if (longitude < -180 || longitude > 180) { - throw new Error( - `Invalid longitude "${longitude}": precondition -180 <= LONGITUDE <= 180 failed.`, - ); - } - if (latitude < -90 || latitude > 90) { - throw new Error( - `Invalid latitude "${latitude}": precondition -90 <= LATITUDE <= 90 failed.`, - ); - } - if (accuracy < 0) { - throw new Error( - `Invalid accuracy "${accuracy}": precondition 0 <= ACCURACY failed.`, - ); - } - await this._client.send("Emulation.setGeolocationOverride", { - longitude, - latitude, - accuracy, - }); - } - /** - * @returns A target this page was created from. - */ - target() { - return this._target; - } - /** - * @returns The browser this page belongs to. - */ - browser() { - return this._target.browser(); - } - /** - * @returns The browser context that the page belongs to - */ - browserContext() { - return this._target.browserContext(); - } - _onTargetCrashed() { - this.emit("error", new Error("Page crashed!")); - } - _onLogEntryAdded(event) { - const { level, text, args, source, url, lineNumber } = event.entry; - if (args) { - args.map((arg) => helper.releaseObject(this._client, arg)); - } - if (source !== "worker") { - this.emit( - "console", /* Console */ - new ConsoleMessage(level, text, [], [{ url, lineNumber }]), - ); - } - } - /** - * @returns The page's main frame. - */ - mainFrame() { - return this._frameManager.mainFrame(); - } - get keyboard() { - return this._keyboard; - } - get touchscreen() { - return this._touchscreen; - } - get coverage() { - return this._coverage; - } - get tracing() { - return this._tracing; - } - get accessibility() { - return this._accessibility; - } - /** - * @returns An array of all frames attached to the page. - */ - frames() { - return this._frameManager.frames(); - } - /** - * @returns all of the dedicated - * {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorkers} - * associated with the page. - */ - workers() { - return Array.from(this._workers.values()); - } - /** - * @param value - Whether to enable request interception. - * @param cacheSafe - Whether to trust browser caching. If set to false, - * enabling request interception disables page caching. Defaults to false. - * - * @remarks - * Activating request interception enables {@link HTTPRequest.abort}, - * {@link HTTPRequest.continue} and {@link HTTPRequest.respond} methods. This - * provides the capability to modify network requests that are made by a page. - * - * Once request interception is enabled, every request will stall unless it's - * continued, responded or aborted; or completed using the browser cache. - * - * @example - * An example of a naïve request interceptor that aborts all image requests: - * ```js - * const puppeteer = require('puppeteer'); - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.setRequestInterception(true); - * page.on('request', interceptedRequest => { - * if (interceptedRequest.url().endsWith('.png') || - * interceptedRequest.url().endsWith('.jpg')) - * interceptedRequest.abort(); - * else - * interceptedRequest.continue(); - * }); - * await page.goto('https://example.com'); - * await browser.close(); - * })(); - * ``` - */ - async setRequestInterception(value, cacheSafe = false) { - return this._frameManager - .networkManager() - .setRequestInterception(value, cacheSafe); - } - /** - * @param enabled - When `true`, enables offline mode for the page. - */ - setOfflineMode(enabled) { - return this._frameManager.networkManager().setOfflineMode(enabled); - } - emulateNetworkConditions(networkConditions) { - return this._frameManager - .networkManager() - .emulateNetworkConditions(networkConditions); - } - /** - * @param timeout - Maximum navigation time in milliseconds. - */ - setDefaultNavigationTimeout(timeout) { - this._timeoutSettings.setDefaultNavigationTimeout(timeout); - } - /** - * @param timeout - Maximum time in milliseconds. - */ - setDefaultTimeout(timeout) { - this._timeoutSettings.setDefaultTimeout(timeout); - } - /** - * Runs `document.querySelector` within the page. If no element matches the - * selector, the return value resolves to `null`. - * - * @remarks - * Shortcut for {@link Frame.$ | Page.mainFrame().$(selector) }. - * - * @param selector - A - * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector} - * to query page for. - */ - async $(selector) { - return this.mainFrame().$(selector); - } - /** - * @remarks - * - * The only difference between {@link Page.evaluate | page.evaluate} and - * `page.evaluateHandle` is that `evaluateHandle` will return the value - * wrapped in an in-page object. - * - * If the function passed to `page.evaluteHandle` returns a Promise, the - * function will wait for the promise to resolve and return its value. - * - * You can pass a string instead of a function (although functions are - * recommended as they are easier to debug and use with TypeScript): - * - * @example - * ``` - * const aHandle = await page.evaluateHandle('document') - * ``` - * - * @example - * {@link JSHandle} instances can be passed as arguments to the `pageFunction`: - * ``` - * const aHandle = await page.evaluateHandle(() => document.body); - * const resultHandle = await page.evaluateHandle(body => body.innerHTML, aHandle); - * console.log(await resultHandle.jsonValue()); - * await resultHandle.dispose(); - * ``` - * - * Most of the time this function returns a {@link JSHandle}, - * but if `pageFunction` returns a reference to an element, - * you instead get an {@link ElementHandle} back: - * - * @example - * ``` - * const button = await page.evaluateHandle(() => document.querySelector('button')); - * // can call `click` because `button` is an `ElementHandle` - * await button.click(); - * ``` - * - * The TypeScript definitions assume that `evaluateHandle` returns - * a `JSHandle`, but if you know it's going to return an - * `ElementHandle`, pass it as the generic argument: - * - * ``` - * const button = await page.evaluateHandle(...); - * ``` - * - * @param pageFunction - a function that is run within the page - * @param args - arguments to be passed to the pageFunction - */ - async evaluateHandle(pageFunction, ...args) { - const context = await this.mainFrame().executionContext(); - return context.evaluateHandle(pageFunction, ...args); - } - /** - * This method iterates the JavaScript heap and finds all objects with the - * given prototype. - * - * @remarks - * - * @example - * - * ```js - * // Create a Map object - * await page.evaluate(() => window.map = new Map()); - * // Get a handle to the Map object prototype - * const mapPrototype = await page.evaluateHandle(() => Map.prototype); - * // Query all map instances into an array - * const mapInstances = await page.queryObjects(mapPrototype); - * // Count amount of map objects in heap - * const count = await page.evaluate(maps => maps.length, mapInstances); - * await mapInstances.dispose(); - * await mapPrototype.dispose(); - * ``` - * @param prototypeHandle - a handle to the object prototype. - */ - async queryObjects(prototypeHandle) { - const context = await this.mainFrame().executionContext(); - return context.queryObjects(prototypeHandle); - } - /** - * This method runs `document.querySelector` within the page and passes the - * result as the first argument to the `pageFunction`. - * - * @remarks - * - * If no element is found matching `selector`, the method will throw an error. - * - * If `pageFunction` returns a promise `$eval` will wait for the promise to - * resolve and then return its value. - * - * @example - * - * ``` - * const searchValue = await page.$eval('#search', el => el.value); - * const preloadHref = await page.$eval('link[rel=preload]', el => el.href); - * const html = await page.$eval('.main-container', el => el.outerHTML); - * ``` - * - * If you are using TypeScript, you may have to provide an explicit type to the - * first argument of the `pageFunction`. - * By default it is typed as `Element`, but you may need to provide a more - * specific sub-type: - * - * @example - * - * ``` - * // if you don't provide HTMLInputElement here, TS will error - * // as `value` is not on `Element` - * const searchValue = await page.$eval('#search', (el: HTMLInputElement) => el.value); - * ``` - * - * The compiler should be able to infer the return type - * from the `pageFunction` you provide. If it is unable to, you can use the generic - * type to tell the compiler what return type you expect from `$eval`: - * - * @example - * - * ``` - * // The compiler can infer the return type in this case, but if it can't - * // or if you want to be more explicit, provide it as the generic type. - * const searchValue = await page.$eval( - * '#search', (el: HTMLInputElement) => el.value - * ); - * ``` - * - * @param selector - the - * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector} - * to query for - * @param pageFunction - the function to be evaluated in the page context. - * Will be passed the result of `document.querySelector(selector)` as its - * first argument. - * @param args - any additional arguments to pass through to `pageFunction`. - * - * @returns The result of calling `pageFunction`. If it returns an element it - * is wrapped in an {@link ElementHandle}, else the raw value itself is - * returned. - */ - async $eval(selector, pageFunction, ...args) { - return this.mainFrame().$eval(selector, pageFunction, ...args); - } - /** - * This method runs `Array.from(document.querySelectorAll(selector))` within - * the page and passes the result as the first argument to the `pageFunction`. - * - * @remarks - * - * If `pageFunction` returns a promise `$$eval` will wait for the promise to - * resolve and then return its value. - * - * @example - * - * ``` - * // get the amount of divs on the page - * const divCount = await page.$$eval('div', divs => divs.length); - * - * // get the text content of all the `.options` elements: - * const options = await page.$$eval('div > span.options', options => { - * return options.map(option => option.textContent) - * }); - * ``` - * - * If you are using TypeScript, you may have to provide an explicit type to the - * first argument of the `pageFunction`. - * By default it is typed as `Element[]`, but you may need to provide a more - * specific sub-type: - * - * @example - * - * ``` - * // if you don't provide HTMLInputElement here, TS will error - * // as `value` is not on `Element` - * await page.$$eval('input', (elements: HTMLInputElement[]) => { - * return elements.map(e => e.value); - * }); - * ``` - * - * The compiler should be able to infer the return type - * from the `pageFunction` you provide. If it is unable to, you can use the generic - * type to tell the compiler what return type you expect from `$$eval`: - * - * @example - * - * ``` - * // The compiler can infer the return type in this case, but if it can't - * // or if you want to be more explicit, provide it as the generic type. - * const allInputValues = await page.$$eval( - * 'input', (elements: HTMLInputElement[]) => elements.map(e => e.textContent) - * ); - * ``` - * - * @param selector - the - * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector} - * to query for - * @param pageFunction - the function to be evaluated in the page context. Will - * be passed the result of `Array.from(document.querySelectorAll(selector))` - * as its first argument. - * @param args - any additional arguments to pass through to `pageFunction`. - * - * @returns The result of calling `pageFunction`. If it returns an element it - * is wrapped in an {@link ElementHandle}, else the raw value itself is - * returned. - */ - async $$eval(selector, pageFunction, ...args) { - return this.mainFrame().$$eval(selector, pageFunction, ...args); - } - async $$(selector) { - return this.mainFrame().$$(selector); - } - async $x(expression) { - return this.mainFrame().$x(expression); - } - /** - * If no URLs are specified, this method returns cookies for the current page - * URL. If URLs are specified, only cookies for those URLs are returned. - */ - async cookies(...urls) { - const originalCookies = (await this._client.send("Network.getCookies", { - urls: urls.length ? urls : [this.url()], - })).cookies; - const unsupportedCookieAttributes = ["priority"]; - const filterUnsupportedAttributes = (cookie) => { - for (const attr of unsupportedCookieAttributes) { - delete cookie[attr]; - } - return cookie; - }; - return originalCookies.map(filterUnsupportedAttributes); - } - async deleteCookie(...cookies) { - const pageURL = this.url(); - for (const cookie of cookies) { - const item = Object.assign({}, cookie); - if (!cookie.url && pageURL.startsWith("http")) { - item.url = pageURL; - } - await this._client.send("Network.deleteCookies", item); - } - } - async setCookie(...cookies) { - const pageURL = this.url(); - const startsWithHTTP = pageURL.startsWith("http"); - const items = cookies.map((cookie) => { - const item = Object.assign({}, cookie); - if (!item.url && startsWithHTTP) { - item.url = pageURL; - } - assert( - item.url !== "about:blank", - `Blank page can not have cookie "${item.name}"`, - ); - assert( - !String.prototype.startsWith.call(item.url || "", "data:"), - `Data URL page can not have cookie "${item.name}"`, - ); - return item; - }); - await this.deleteCookie(...items); - if (items.length) { - await this._client.send("Network.setCookies", { cookies: items }); - } - } - async addScriptTag(options) { - return this.mainFrame().addScriptTag(options); - } - async addStyleTag(options) { - return this.mainFrame().addStyleTag(options); - } - async exposeFunction(name, puppeteerFunction) { - if (this._pageBindings.has(name)) { - throw new Error( - `Failed to add page binding with name ${name}: window['${name}'] already exists!`, - ); - } - this._pageBindings.set(name, puppeteerFunction); - const expression = helper.pageBindingInitString("exposedFun", name); - await this._client.send("Runtime.addBinding", { name: name }); - await this._client.send("Page.addScriptToEvaluateOnNewDocument", { - source: expression, - }); - await Promise.all( - this.frames().map((frame) => - frame.evaluate(expression).catch(debugError) - ), - ); - } - async authenticate(credentials) { - return this._frameManager.networkManager().authenticate(credentials); - } - async setExtraHTTPHeaders(headers) { - return this._frameManager.networkManager().setExtraHTTPHeaders(headers); - } - async setUserAgent(userAgent) { - return this._frameManager.networkManager().setUserAgent(userAgent); - } - async metrics() { - const response = await this._client.send("Performance.getMetrics"); - return this._buildMetricsObject(response.metrics); - } - _emitMetrics(event) { - this.emit("metrics", /* Metrics */ { - title: event.title, - metrics: this._buildMetricsObject(event.metrics), - }); - } - _buildMetricsObject(metrics) { - const result = {}; - for (const metric of metrics || []) { - if (supportedMetrics.has(metric.name)) { - result[metric.name] = metric.value; - } - } - return result; - } - _handleException(exceptionDetails) { - const message = helper.getExceptionMessage(exceptionDetails); - const err = new Error(message); - err.stack = ""; // Don't report clientside error with a node stack attached - this.emit("pageerror", /* PageError */ err); - } - async _onConsoleAPI(event) { - if (event.executionContextId === 0) { - // DevTools protocol stores the last 1000 console messages. These - // messages are always reported even for removed execution contexts. In - // this case, they are marked with executionContextId = 0 and are - // reported upon enabling Runtime agent. - // - // Ignore these messages since: - // - there's no execution context we can use to operate with message - // arguments - // - these messages are reported before Puppeteer clients can subscribe - // to the 'console' - // page event. - // - // @see https://github.com/puppeteer/puppeteer/issues/3865 - return; - } - const context = this._frameManager.executionContextById( - event.executionContextId, - ); - const values = event.args.map((arg) => createJSHandle(context, arg)); - this._addConsoleMessage(event.type, values, event.stackTrace); - } - async _onBindingCalled(event) { - let payload; - try { - payload = JSON.parse(event.payload); - } catch { - // The binding was either called by something in the page or it was - // called before our wrapper was initialized. - return; - } - const { type, name, seq, args } = payload; - if (type !== "exposedFun" || !this._pageBindings.has(name)) { - return; - } - let expression = null; - try { - const result = await this._pageBindings.get(name)(...args); - expression = helper.pageBindingDeliverResultString(name, seq, result); - } catch (error) { - if (error instanceof Error) { - expression = helper.pageBindingDeliverErrorString( - name, - seq, - error.message, - error.stack, - ); - } else { - expression = helper.pageBindingDeliverErrorValueString( - name, - seq, - error, - ); - } - } - this._client - .send("Runtime.evaluate", { - expression, - contextId: event.executionContextId, - }) - .catch(debugError); - } - _addConsoleMessage(type, args, stackTrace) { - if (!this.listenerCount("console" /* Console */)) { - args.forEach((arg) => arg.dispose()); - return; - } - const textTokens = []; - for (const arg of args) { - const remoteObject = arg._remoteObject; - if (remoteObject.objectId) { - textTokens.push(arg.toString()); - } else { - textTokens.push(helper.valueFromRemoteObject(remoteObject)); - } - } - const stackTraceLocations = []; - if (stackTrace) { - for (const callFrame of stackTrace.callFrames) { - stackTraceLocations.push({ - url: callFrame.url, - lineNumber: callFrame.lineNumber, - columnNumber: callFrame.columnNumber, - }); - } - } - const message = new ConsoleMessage( - type, - textTokens.join(" "), - args, - stackTraceLocations, - ); - this.emit("console", /* Console */ message); - } - _onDialog(event) { - let dialogType = null; - const validDialogTypes = new Set([ - "alert", - "confirm", - "prompt", - "beforeunload", - ]); - if (validDialogTypes.has(event.type)) { - dialogType = event.type; - } - assert(dialogType, "Unknown javascript dialog type: " + event.type); - const dialog = new Dialog( - this._client, - dialogType, - event.message, - event.defaultPrompt, - ); - this.emit("dialog", /* Dialog */ dialog); - } - /** - * Resets default white background - */ - async _resetDefaultBackgroundColor() { - await this._client.send("Emulation.setDefaultBackgroundColorOverride"); - } - /** - * Hides default white background - */ - async _setTransparentBackgroundColor() { - await this._client.send("Emulation.setDefaultBackgroundColorOverride", { - color: { r: 0, g: 0, b: 0, a: 0 }, - }); - } - url() { - return this.mainFrame().url(); - } - async content() { - return await this._frameManager.mainFrame().content(); - } - async setContent(html, options = {}) { - await this._frameManager.mainFrame().setContent(html, options); - } - async goto(url, options = {}) { - return await this._frameManager.mainFrame().goto(url, options); - } - async reload(options) { - const result = await Promise.all([ - this.waitForNavigation(options), - this._client.send("Page.reload"), - ]); - return result[0]; - } - async waitForNavigation(options = {}) { - return await this._frameManager.mainFrame().waitForNavigation(options); - } - _sessionClosePromise() { - if (!this._disconnectPromise) { - this._disconnectPromise = new Promise((fulfill) => - this._client.once( - CDPSessionEmittedEvents.Disconnected, - () => fulfill(new Error("Target closed")), - ) - ); - } - return this._disconnectPromise; - } - async waitForRequest(urlOrPredicate, options = {}) { - const { timeout = this._timeoutSettings.timeout() } = options; - return helper.waitForEvent( - this._frameManager.networkManager(), - NetworkManagerEmittedEvents.Request, - (request) => { - if (helper.isString(urlOrPredicate)) { - return urlOrPredicate === request.url(); - } - if (typeof urlOrPredicate === "function") { - return !!urlOrPredicate(request); - } - return false; - }, - timeout, - this._sessionClosePromise(), - ); - } - async waitForResponse(urlOrPredicate, options = {}) { - const { timeout = this._timeoutSettings.timeout() } = options; - return helper.waitForEvent( - this._frameManager.networkManager(), - NetworkManagerEmittedEvents.Response, - async (response) => { - if (helper.isString(urlOrPredicate)) { - return urlOrPredicate === response.url(); - } - if (typeof urlOrPredicate === "function") { - return !!(await urlOrPredicate(response)); - } - return false; - }, - timeout, - this._sessionClosePromise(), - ); - } - async goBack(options = {}) { - return this._go(-1, options); - } - async goForward(options = {}) { - return this._go(+1, options); - } - async _go(delta, options) { - const history = await this._client.send("Page.getNavigationHistory"); - const entry = history.entries[history.currentIndex + delta]; - if (!entry) { - return null; - } - const result = await Promise.all([ - this.waitForNavigation(options), - this._client.send("Page.navigateToHistoryEntry", { entryId: entry.id }), - ]); - return result[0]; - } - async bringToFront() { - await this._client.send("Page.bringToFront"); - } - async emulate(options) { - await Promise.all([ - this.setViewport(options.viewport), - this.setUserAgent(options.userAgent), - ]); - } - async setJavaScriptEnabled(enabled) { - if (this._javascriptEnabled === enabled) { - return; - } - this._javascriptEnabled = enabled; - await this._client.send("Emulation.setScriptExecutionDisabled", { - value: !enabled, - }); - } - async setBypassCSP(enabled) { - await this._client.send("Page.setBypassCSP", { enabled }); - } - async emulateMediaType(type) { - assert( - type === "screen" || type === "print" || type === null, - "Unsupported media type: " + type, - ); - await this._client.send("Emulation.setEmulatedMedia", { - media: type || "", - }); - } - async emulateMediaFeatures(features) { - if (features === null) { - await this._client.send("Emulation.setEmulatedMedia", { features: null }); - } - if (Array.isArray(features)) { - features.every((mediaFeature) => { - const name = mediaFeature.name; - assert( - /^(?:prefers-(?:color-scheme|reduced-motion)|color-gamut)$/.test( - name, - ), - "Unsupported media feature: " + name, - ); - return true; - }); - await this._client.send("Emulation.setEmulatedMedia", { - features: features, - }); - } - } - async emulateTimezone(timezoneId) { - try { - await this._client.send("Emulation.setTimezoneOverride", { - timezoneId: timezoneId || "", - }); - } catch (error) { - if (error.message.includes("Invalid timezone")) { - throw new Error(`Invalid timezone ID: ${timezoneId}`); - } - throw error; - } - } - /** - * Emulates the idle state. - * If no arguments set, clears idle state emulation. - * - * @example - * ```js - * // set idle emulation - * await page.emulateIdleState({isUserActive: true, isScreenUnlocked: false}); - * - * // do some checks here - * ... - * - * // clear idle emulation - * await page.emulateIdleState(); - * ``` - * - * @param overrides - Mock idle state. If not set, clears idle overrides - * @param isUserActive - Mock isUserActive - * @param isScreenUnlocked - Mock isScreenUnlocked - */ - async emulateIdleState(overrides) { - if (overrides) { - await this._client.send("Emulation.setIdleOverride", { - isUserActive: overrides.isUserActive, - isScreenUnlocked: overrides.isScreenUnlocked, - }); - } else { - await this._client.send("Emulation.clearIdleOverride"); - } - } - /** - * Simulates the given vision deficiency on the page. - * - * @example - * ```js - * const puppeteer = require('puppeteer'); - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.goto('https://v8.dev/blog/10-years'); - * - * await page.emulateVisionDeficiency('achromatopsia'); - * await page.screenshot({ path: 'achromatopsia.png' }); - * - * await page.emulateVisionDeficiency('deuteranopia'); - * await page.screenshot({ path: 'deuteranopia.png' }); - * - * await page.emulateVisionDeficiency('blurredVision'); - * await page.screenshot({ path: 'blurred-vision.png' }); - * - * await browser.close(); - * })(); - * ``` - * - * @param type - the type of deficiency to simulate, or `'none'` to reset. - */ - async emulateVisionDeficiency(type) { - const visionDeficiencies = new Set([ - "none", - "achromatopsia", - "blurredVision", - "deuteranopia", - "protanopia", - "tritanopia", - ]); - try { - assert( - !type || visionDeficiencies.has(type), - `Unsupported vision deficiency: ${type}`, - ); - await this._client.send("Emulation.setEmulatedVisionDeficiency", { - type: type || "none", - }); - } catch (error) { - throw error; - } - } - async setViewport(viewport) { - const needsReload = await this._emulationManager.emulateViewport(viewport); - this._viewport = viewport; - if (needsReload) { - await this.reload(); - } - } - viewport() { - return this._viewport; - } - /** - * @remarks - * - * Evaluates a function in the page's context and returns the result. - * - * If the function passed to `page.evaluteHandle` returns a Promise, the - * function will wait for the promise to resolve and return its value. - * - * @example - * - * ```js - * const result = await frame.evaluate(() => { - * return Promise.resolve(8 * 7); - * }); - * console.log(result); // prints "56" - * ``` - * - * You can pass a string instead of a function (although functions are - * recommended as they are easier to debug and use with TypeScript): - * - * @example - * ``` - * const aHandle = await page.evaluate('1 + 2'); - * ``` - * - * To get the best TypeScript experience, you should pass in as the - * generic the type of `pageFunction`: - * - * ``` - * const aHandle = await page.evaluate<() => number>(() => 2); - * ``` - * - * @example - * - * {@link ElementHandle} instances (including {@link JSHandle}s) can be passed - * as arguments to the `pageFunction`: - * - * ``` - * const bodyHandle = await page.$('body'); - * const html = await page.evaluate(body => body.innerHTML, bodyHandle); - * await bodyHandle.dispose(); - * ``` - * - * @param pageFunction - a function that is run within the page - * @param args - arguments to be passed to the pageFunction - * - * @returns the return value of `pageFunction`. - */ - async evaluate(pageFunction, ...args) { - return this._frameManager.mainFrame().evaluate(pageFunction, ...args); - } - async evaluateOnNewDocument(pageFunction, ...args) { - const source = helper.evaluationString(pageFunction, ...args); - await this._client.send("Page.addScriptToEvaluateOnNewDocument", { - source, - }); - } - async setCacheEnabled(enabled = true) { - await this._frameManager.networkManager().setCacheEnabled(enabled); - } - async screenshot(options = {}) { - let screenshotType = null; - // options.type takes precedence over inferring the type from options.path - // because it may be a 0-length file with no extension created beforehand - // (i.e. as a temp file). - if (options.type) { - assert( - options.type === "png" || options.type === "jpeg", - "Unknown options.type value: " + options.type, - ); - screenshotType = options.type; - } else if (options.path) { - const filePath = options.path; - const extension = filePath - .slice(filePath.lastIndexOf(".") + 1) - .toLowerCase(); - if (extension === "png") { - screenshotType = "png"; - } else if (extension === "jpg" || extension === "jpeg") { - screenshotType = "jpeg"; - } - assert( - screenshotType, - `Unsupported screenshot type for extension \`.${extension}\``, - ); - } - if (!screenshotType) { - screenshotType = "png"; - } - if (options.quality) { - assert( - screenshotType === "jpeg", - "options.quality is unsupported for the " + - screenshotType + - " screenshots", - ); - assert( - typeof options.quality === "number", - "Expected options.quality to be a number but found " + - typeof options.quality, - ); - assert( - Number.isInteger(options.quality), - "Expected options.quality to be an integer", - ); - assert( - options.quality >= 0 && options.quality <= 100, - "Expected options.quality to be between 0 and 100 (inclusive), got " + - options.quality, - ); - } - assert( - !options.clip || !options.fullPage, - "options.clip and options.fullPage are exclusive", - ); - if (options.clip) { - assert( - typeof options.clip.x === "number", - "Expected options.clip.x to be a number but found " + - typeof options.clip.x, - ); - assert( - typeof options.clip.y === "number", - "Expected options.clip.y to be a number but found " + - typeof options.clip.y, - ); - assert( - typeof options.clip.width === "number", - "Expected options.clip.width to be a number but found " + - typeof options.clip.width, - ); - assert( - typeof options.clip.height === "number", - "Expected options.clip.height to be a number but found " + - typeof options.clip.height, - ); - assert( - options.clip.width !== 0, - "Expected options.clip.width not to be 0.", - ); - assert( - options.clip.height !== 0, - "Expected options.clip.height not to be 0.", - ); - } - return this._screenshotTaskQueue.postTask(() => - this._screenshotTask(screenshotType, options) - ); - } - async _screenshotTask(format, options) { - await this._client.send("Target.activateTarget", { - targetId: this._target._targetId, - }); - let clip = options.clip ? processClip(options.clip) : undefined; - let { captureBeyondViewport = true } = options; - captureBeyondViewport = typeof captureBeyondViewport === "boolean" - ? captureBeyondViewport - : true; - if (options.fullPage) { - const metrics = await this._client.send("Page.getLayoutMetrics"); - const width = Math.ceil(metrics.contentSize.width); - const height = Math.ceil(metrics.contentSize.height); - // Overwrite clip for full page. - clip = { x: 0, y: 0, width, height, scale: 1 }; - if (!captureBeyondViewport) { - const { isMobile = false, deviceScaleFactor = 1, isLandscape = false } = - this._viewport || {}; - const screenOrientation = isLandscape - ? { angle: 90, type: "landscapePrimary" } - : { angle: 0, type: "portraitPrimary" }; - await this._client.send("Emulation.setDeviceMetricsOverride", { - mobile: isMobile, - width, - height, - deviceScaleFactor, - screenOrientation, - }); - } - } - const shouldSetDefaultBackground = options.omitBackground && - format === "png"; - if (shouldSetDefaultBackground) { - await this._setTransparentBackgroundColor(); - } - const result = await this._client.send("Page.captureScreenshot", { - format, - quality: options.quality, - clip, - captureBeyondViewport, - }); - if (shouldSetDefaultBackground) { - await this._resetDefaultBackgroundColor(); - } - if (options.fullPage && this._viewport) { - await this.setViewport(this._viewport); - } - const data = options.encoding === "base64" - ? result.data - : base64Decode(result.data); - if (options.path) { - await Deno.writeFile(options.path, base64Decode(result.data)); - } - return data; - function processClip(clip) { - const x = Math.round(clip.x); - const y = Math.round(clip.y); - const width = Math.round(clip.width + clip.x - x); - const height = Math.round(clip.height + clip.y - y); - return { x, y, width, height, scale: 1 }; - } - } - /** - * Generatees a PDF of the page with the `print` CSS media type. - * @remarks - * - * IMPORTANT: PDF generation is only supported in Chrome headless mode. - * - * To generate a PDF with the `screen` media type, call - * {@link Page.emulateMediaType | `page.emulateMediaType('screen')`} before - * calling `page.pdf()`. - * - * By default, `page.pdf()` generates a pdf with modified colors for printing. - * Use the - * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-print-color-adjust | `-webkit-print-color-adjust`} - * property to force rendering of exact colors. - * - * - * @param options - options for generating the PDF. - */ - async pdf(options = {}) { - const { - scale = 1, - displayHeaderFooter = false, - headerTemplate = "", - footerTemplate = "", - printBackground = false, - landscape = false, - pageRanges = "", - preferCSSPageSize = false, - margin = {}, - path = null, - omitBackground = false, - } = options; - let paperWidth = 8.5; - let paperHeight = 11; - if (options.format) { - const format = paperFormats[options.format.toLowerCase()]; - assert(format, "Unknown paper format: " + options.format); - paperWidth = format.width; - paperHeight = format.height; - } else { - paperWidth = convertPrintParameterToInches(options.width) || paperWidth; - paperHeight = convertPrintParameterToInches(options.height) || - paperHeight; - } - const marginTop = convertPrintParameterToInches(margin.top) || 0; - const marginLeft = convertPrintParameterToInches(margin.left) || 0; - const marginBottom = convertPrintParameterToInches(margin.bottom) || 0; - const marginRight = convertPrintParameterToInches(margin.right) || 0; - if (omitBackground) { - await this._setTransparentBackgroundColor(); - } - const result = await this._client.send("Page.printToPDF", { - transferMode: "ReturnAsStream", - landscape, - displayHeaderFooter, - headerTemplate, - footerTemplate, - printBackground, - scale, - paperWidth, - paperHeight, - marginTop, - marginBottom, - marginLeft, - marginRight, - pageRanges, - preferCSSPageSize, - }); - if (omitBackground) { - await this._resetDefaultBackgroundColor(); - } - return await helper.readProtocolStream(this._client, result.stream, path); - } - async title() { - return this.mainFrame().title(); - } - async close(options = { runBeforeUnload: undefined }) { - assert( - !!this._client._connection, - "Protocol error: Connection closed. Most likely the page has been closed.", - ); - const runBeforeUnload = !!options.runBeforeUnload; - if (runBeforeUnload) { - await this._client.send("Page.close"); - } else { - await this._client._connection.send("Target.closeTarget", { - targetId: this._target._targetId, - }); - await this._target._isClosedPromise; - } - } - isClosed() { - return this._closed; - } - get mouse() { - return this._mouse; - } - click(selector, options = {}) { - return this.mainFrame().click(selector, options); - } - focus(selector) { - return this.mainFrame().focus(selector); - } - hover(selector) { - return this.mainFrame().hover(selector); - } - select(selector, ...values) { - return this.mainFrame().select(selector, ...values); - } - tap(selector) { - return this.mainFrame().tap(selector); - } - type(selector, text, options) { - return this.mainFrame().type(selector, text, options); - } - /** - * @remarks - * - * This method behaves differently depending on the first parameter. If it's a - * `string`, it will be treated as a `selector` or `xpath` (if the string - * starts with `//`). This method then is a shortcut for - * {@link Page.waitForSelector} or {@link Page.waitForXPath}. - * - * If the first argument is a function this method is a shortcut for - * {@link Page.waitForFunction}. - * - * If the first argument is a `number`, it's treated as a timeout in - * milliseconds and the method returns a promise which resolves after the - * timeout. - * - * @param selectorOrFunctionOrTimeout - a selector, predicate or timeout to - * wait for. - * @param options - optional waiting parameters. - * @param args - arguments to pass to `pageFunction`. - * - * @deprecated Don't use this method directly. Instead use the more explicit - * methods available: {@link Page.waitForSelector}, - * {@link Page.waitForXPath}, {@link Page.waitForFunction} or - * {@link Page.waitForTimeout}. - */ - waitFor(selectorOrFunctionOrTimeout, options = {}, ...args) { - return this.mainFrame().waitFor( - selectorOrFunctionOrTimeout, - options, - ...args, - ); - } - /** - * Causes your script to wait for the given number of milliseconds. - * - * @remarks - * - * It's generally recommended to not wait for a number of seconds, but instead - * use {@link Page.waitForSelector}, {@link Page.waitForXPath} or - * {@link Page.waitForFunction} to wait for exactly the conditions you want. - * - * @example - * - * Wait for 1 second: - * - * ``` - * await page.waitForTimeout(1000); - * ``` - * - * @param milliseconds - the number of milliseconds to wait. - */ - waitForTimeout(milliseconds) { - return this.mainFrame().waitForTimeout(milliseconds); - } - waitForSelector(selector, options = {}) { - return this.mainFrame().waitForSelector(selector, options); - } - waitForXPath(xpath, options = {}) { - return this.mainFrame().waitForXPath(xpath, options); - } - waitForFunction(pageFunction, options = {}, ...args) { - return this.mainFrame().waitForFunction(pageFunction, options, ...args); - } -} -const supportedMetrics = new Set([ - "Timestamp", - "Documents", - "Frames", - "JSEventListeners", - "Nodes", - "LayoutCount", - "RecalcStyleCount", - "LayoutDuration", - "RecalcStyleDuration", - "ScriptDuration", - "TaskDuration", - "JSHeapUsedSize", - "JSHeapTotalSize", -]); -const unitToPixels = { - px: 1, - in: 96, - cm: 37.8, - mm: 3.78, -}; -function convertPrintParameterToInches(parameter) { - if (typeof parameter === "undefined") { - return undefined; - } - let pixels; - if (helper.isNumber(parameter)) { - // Treat numbers as pixel values to be aligned with phantom's paperSize. - pixels = /** @type {number} */ parameter; - } else if (helper.isString(parameter)) { - const text = /** @type {string} */ parameter; - let unit = text.substring(text.length - 2).toLowerCase(); - let valueText = ""; - if (unitToPixels.hasOwnProperty(unit)) { - valueText = text.substring(0, text.length - 2); - } else { - // In case of unknown unit try to parse the whole parameter as number of pixels. - // This is consistent with phantom's paperSize behavior. - unit = "px"; - valueText = text; - } - const value = Number(valueText); - assert(!isNaN(value), "Failed to parse parameter value: " + text); - pixels = value * unitToPixels[unit]; - } else { - throw new Error( - "page.pdf() Cannot handle parameter type: " + typeof parameter, - ); - } - return pixels / 96; -} -//# sourceMappingURL=Page.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Product.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Product.d.ts deleted file mode 100644 index 769f5ba1ffc..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Product.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Supported products. - * @public - */ -export declare type Product = "chrome" | "firefox"; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Product.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Product.js deleted file mode 100644 index ab520b2d9fe..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Product.js +++ /dev/null @@ -1,18 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export {}; -//# sourceMappingURL=Product.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Puppeteer.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Puppeteer.d.ts deleted file mode 100644 index e5e77af9348..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Puppeteer.d.ts +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { PuppeteerErrors } from "./Errors.js"; -import { ConnectionTransport } from "./ConnectionTransport.js"; -import { DevicesMap } from "./DeviceDescriptors.js"; -import { Browser } from "./Browser.js"; -import { CustomQueryHandler } from "./QueryHandler.js"; -import { Product } from "./Product.js"; -import { BrowserConnectOptions } from "./BrowserConnector.js"; -import { PredefinedNetworkConditions } from "./NetworkConditions.js"; -/** - * Settings that are common to the Puppeteer class, regardless of enviroment. - * @internal - */ -export interface ConnectOptions extends BrowserConnectOptions { - browserWSEndpoint?: string; - browserURL?: string; - transport?: ConnectionTransport; - product?: Product; -} -/** - * The main Puppeteer class. - * - * IMPORTANT: if you are using Puppeteer in a Node environment, you will get an - * instance of {@link PuppeteerNode} when you import or require `puppeteer`. - * That class extends `Puppeteer`, so has all the methods documented below as - * well as all that are defined on {@link PuppeteerNode}. - * @public - */ -export declare class Puppeteer { - protected _isPuppeteerCore: boolean; - protected _changedProduct: boolean; - /** - * @internal - */ - constructor(); - /** - * This method attaches Puppeteer to an existing browser instance. - * - * @remarks - * - * @param options - Set of configurable options to set on the browser. - * @returns Promise which resolves to browser instance. - */ - connect(options: ConnectOptions): Promise; - /** - * @remarks - * A list of devices to be used with `page.emulate(options)`. Actual list of devices can be found in {@link https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts | src/common/DeviceDescriptors.ts}. - * - * @example - * - * ```js - * const puppeteer = require('puppeteer'); - * const iPhone = puppeteer.devices['iPhone 6']; - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.emulate(iPhone); - * await page.goto('https://www.google.com'); - * // other actions... - * await browser.close(); - * })(); - * ``` - * - */ - get devices(): DevicesMap; - /** - * @remarks - * - * Puppeteer methods might throw errors if they are unable to fulfill a request. - * For example, `page.waitForSelector(selector[, options])` might fail if - * the selector doesn't match any nodes during the given timeframe. - * - * For certain types of errors Puppeteer uses specific error classes. - * These classes are available via `puppeteer.errors`. - * - * @example - * An example of handling a timeout error: - * ```js - * try { - * await page.waitForSelector('.foo'); - * } catch (e) { - * if (e instanceof puppeteer.errors.TimeoutError) { - * // Do something if this is a timeout. - * } - * } - * ``` - */ - get errors(): PuppeteerErrors; - /** - * @remarks - * Returns a list of network conditions to be used with `page.emulateNetworkConditions(networkConditions)`. Actual list of predefined conditions can be found in {@link https://github.com/puppeteer/puppeteer/blob/main/src/common/NetworkConditions.ts | src/common/NetworkConditions.ts}. - * - * @example - * - * ```js - * const puppeteer = require('puppeteer'); - * const slow3G = puppeteer.networkConditions['Slow 3G']; - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.emulateNetworkConditions(slow3G); - * await page.goto('https://www.google.com'); - * // other actions... - * await browser.close(); - * })(); - * ``` - * - */ - get networkConditions(): PredefinedNetworkConditions; - /** - * Registers a {@link CustomQueryHandler | custom query handler}. After - * registration, the handler can be used everywhere where a selector is - * expected by prepending the selection string with `/`. The name is - * only allowed to consist of lower- and upper case latin letters. - * @example - * ``` - * puppeteer.registerCustomQueryHandler('text', { … }); - * const aHandle = await page.$('text/…'); - * ``` - * @param name - The name that the custom query handler will be registered under. - * @param queryHandler - The {@link CustomQueryHandler | custom query handler} to - * register. - */ - registerCustomQueryHandler( - name: string, - queryHandler: CustomQueryHandler, - ): void; - /** - * @param name - The name of the query handler to unregistered. - */ - unregisterCustomQueryHandler(name: string): void; - /** - * @returns a list with the names of all registered custom query handlers. - */ - customQueryHandlerNames(): string[]; - /** - * Clears all registered handlers. - */ - clearCustomQueryHandlers(): void; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Puppeteer.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Puppeteer.js deleted file mode 100644 index 254e472f5cb..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Puppeteer.js +++ /dev/null @@ -1,163 +0,0 @@ -/// -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { puppeteerErrors } from "./Errors.js"; -import { devicesMap } from "./DeviceDescriptors.js"; -import { - clearCustomQueryHandlers, - customQueryHandlerNames, - registerCustomQueryHandler, - unregisterCustomQueryHandler, -} from "./QueryHandler.js"; -import { connectToBrowser } from "./BrowserConnector.js"; -import { networkConditions } from "./NetworkConditions.js"; -/** - * The main Puppeteer class. - * - * IMPORTANT: if you are using Puppeteer in a Node environment, you will get an - * instance of {@link PuppeteerNode} when you import or require `puppeteer`. - * That class extends `Puppeteer`, so has all the methods documented below as - * well as all that are defined on {@link PuppeteerNode}. - * @public - */ -export class Puppeteer { - /** - * @internal - */ - constructor() { - this._changedProduct = false; - } - /** - * This method attaches Puppeteer to an existing browser instance. - * - * @remarks - * - * @param options - Set of configurable options to set on the browser. - * @returns Promise which resolves to browser instance. - */ - connect(options) { - return connectToBrowser(options); - } - /** - * @remarks - * A list of devices to be used with `page.emulate(options)`. Actual list of devices can be found in {@link https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts | src/common/DeviceDescriptors.ts}. - * - * @example - * - * ```js - * const puppeteer = require('puppeteer'); - * const iPhone = puppeteer.devices['iPhone 6']; - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.emulate(iPhone); - * await page.goto('https://www.google.com'); - * // other actions... - * await browser.close(); - * })(); - * ``` - * - */ - get devices() { - return devicesMap; - } - /** - * @remarks - * - * Puppeteer methods might throw errors if they are unable to fulfill a request. - * For example, `page.waitForSelector(selector[, options])` might fail if - * the selector doesn't match any nodes during the given timeframe. - * - * For certain types of errors Puppeteer uses specific error classes. - * These classes are available via `puppeteer.errors`. - * - * @example - * An example of handling a timeout error: - * ```js - * try { - * await page.waitForSelector('.foo'); - * } catch (e) { - * if (e instanceof puppeteer.errors.TimeoutError) { - * // Do something if this is a timeout. - * } - * } - * ``` - */ - get errors() { - return puppeteerErrors; - } - /** - * @remarks - * Returns a list of network conditions to be used with `page.emulateNetworkConditions(networkConditions)`. Actual list of predefined conditions can be found in {@link https://github.com/puppeteer/puppeteer/blob/main/src/common/NetworkConditions.ts | src/common/NetworkConditions.ts}. - * - * @example - * - * ```js - * const puppeteer = require('puppeteer'); - * const slow3G = puppeteer.networkConditions['Slow 3G']; - * - * (async () => { - * const browser = await puppeteer.launch(); - * const page = await browser.newPage(); - * await page.emulateNetworkConditions(slow3G); - * await page.goto('https://www.google.com'); - * // other actions... - * await browser.close(); - * })(); - * ``` - * - */ - get networkConditions() { - return networkConditions; - } - /** - * Registers a {@link CustomQueryHandler | custom query handler}. After - * registration, the handler can be used everywhere where a selector is - * expected by prepending the selection string with `/`. The name is - * only allowed to consist of lower- and upper case latin letters. - * @example - * ``` - * puppeteer.registerCustomQueryHandler('text', { … }); - * const aHandle = await page.$('text/…'); - * ``` - * @param name - The name that the custom query handler will be registered under. - * @param queryHandler - The {@link CustomQueryHandler | custom query handler} to - * register. - */ - registerCustomQueryHandler(name, queryHandler) { - registerCustomQueryHandler(name, queryHandler); - } - /** - * @param name - The name of the query handler to unregistered. - */ - unregisterCustomQueryHandler(name) { - unregisterCustomQueryHandler(name); - } - /** - * @returns a list with the names of all registered custom query handlers. - */ - customQueryHandlerNames() { - return customQueryHandlerNames(); - } - /** - * Clears all registered handlers. - */ - clearCustomQueryHandlers() { - clearCustomQueryHandlers(); - } -} -//# sourceMappingURL=Puppeteer.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/PuppeteerViewport.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/PuppeteerViewport.d.ts deleted file mode 100644 index 318fdb583dc..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/PuppeteerViewport.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * - * Sets the viewport of the page. - * @public - */ -export interface Viewport { - /** - * The page width in pixels. - */ - width: number; - /** - * The page height in pixels. - */ - height: number; - /** - * Specify device scale factor. - * See {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio | devicePixelRatio} for more info. - * @defaultValue 1 - */ - deviceScaleFactor?: number; - /** - * Whether the `meta viewport` tag is taken into account. - * @defaultValue false - */ - isMobile?: boolean; - /** - * Specifies if the viewport is in landscape mode. - * @defaultValue false - */ - isLandscape?: boolean; - /** - * Specify if the viewport supports touch events. - * @defaultValue false - */ - hasTouch?: boolean; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/PuppeteerViewport.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/PuppeteerViewport.js deleted file mode 100644 index 0640753d471..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/PuppeteerViewport.js +++ /dev/null @@ -1,3 +0,0 @@ -/// -export {}; -//# sourceMappingURL=PuppeteerViewport.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/QueryHandler.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/QueryHandler.d.ts deleted file mode 100644 index d6b92a34675..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/QueryHandler.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { DOMWorld, WaitForSelectorOptions } from "./DOMWorld.js"; -import { ElementHandle, JSHandle } from "./JSHandle.js"; -/** - * @internal - */ -export interface InternalQueryHandler { - queryOne?: ( - element: ElementHandle, - selector: string, - ) => Promise; - waitFor?: ( - domWorld: DOMWorld, - selector: string, - options: WaitForSelectorOptions, - ) => Promise; - queryAll?: ( - element: ElementHandle, - selector: string, - ) => Promise; - queryAllArray?: ( - element: ElementHandle, - selector: string, - ) => Promise; -} -/** - * Contains two functions `queryOne` and `queryAll` that can - * be {@link Puppeteer.registerCustomQueryHandler | registered} - * as alternative querying strategies. The functions `queryOne` and `queryAll` - * are executed in the page context. `queryOne` should take an `Element` and a - * selector string as argument and return a single `Element` or `null` if no - * element is found. `queryAll` takes the same arguments but should instead - * return a `NodeListOf` or `Array` with all the elements - * that match the given query selector. - * @public - */ -export interface CustomQueryHandler { - queryOne?: (element: any, selector: string) => any | null; - queryAll?: (element: any, selector: string) => any[]; -} -/** - * @internal - */ -export declare function registerCustomQueryHandler( - name: string, - handler: CustomQueryHandler, -): void; -/** - * @internal - */ -export declare function unregisterCustomQueryHandler(name: string): void; -/** - * @internal - */ -export declare function customQueryHandlerNames(): string[]; -/** - * @internal - */ -export declare function clearCustomQueryHandlers(): void; -/** - * @internal - */ -export declare function getQueryHandlerAndSelector(selector: string): { - updatedSelector: string; - queryHandler: InternalQueryHandler; -}; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/QueryHandler.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/QueryHandler.js deleted file mode 100644 index 30a6dba527c..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/QueryHandler.js +++ /dev/null @@ -1,175 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { ariaHandler } from "./AriaQueryHandler.js"; -function makeQueryHandler(handler) { - const internalHandler = {}; - if (handler.queryOne) { - internalHandler.queryOne = async (element, selector) => { - const jsHandle = await element.evaluateHandle(handler.queryOne, selector); - const elementHandle = jsHandle.asElement(); - if (elementHandle) { - return elementHandle; - } - await jsHandle.dispose(); - return null; - }; - internalHandler.waitFor = (domWorld, selector, options) => - domWorld.waitForSelectorInPage(handler.queryOne, selector, options); - } - if (handler.queryAll) { - internalHandler.queryAll = async (element, selector) => { - const jsHandle = await element.evaluateHandle(handler.queryAll, selector); - const properties = await jsHandle.getProperties(); - await jsHandle.dispose(); - const result = []; - for (const property of properties.values()) { - const elementHandle = property.asElement(); - if (elementHandle) { - result.push(elementHandle); - } - } - return result; - }; - internalHandler.queryAllArray = async (element, selector) => { - const resultHandle = await element.evaluateHandle( - handler.queryAll, - selector, - ); - const arrayHandle = await resultHandle.evaluateHandle((res) => - Array.from(res) - ); - return arrayHandle; - }; - } - return internalHandler; -} -const _defaultHandler = makeQueryHandler({ - queryOne: (element, selector) => element.querySelector(selector), - queryAll: (element, selector) => element.querySelectorAll(selector), -}); -const pierceHandler = makeQueryHandler({ - queryOne: (element, selector) => { - let found = null; - const search = (root) => { - const iter = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT); - do { - const currentNode = iter.currentNode; - if (currentNode.shadowRoot) { - search(currentNode.shadowRoot); - } - if (currentNode instanceof ShadowRoot) { - continue; - } - if (!found && currentNode.matches(selector)) { - found = currentNode; - } - } while (!found && iter.nextNode()); - }; - if (element instanceof Document) { - element = element.documentElement; - } - search(element); - return found; - }, - queryAll: (element, selector) => { - const result = []; - const collect = (root) => { - const iter = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT); - do { - const currentNode = iter.currentNode; - if (currentNode.shadowRoot) { - collect(currentNode.shadowRoot); - } - if (currentNode instanceof ShadowRoot) { - continue; - } - if (currentNode.matches(selector)) { - result.push(currentNode); - } - } while (iter.nextNode()); - }; - if (element instanceof Document) { - element = element.documentElement; - } - collect(element); - return result; - }, -}); -const _builtInHandlers = new Map([ - ["aria", ariaHandler], - ["pierce", pierceHandler], -]); -const _queryHandlers = new Map(_builtInHandlers); -/** - * @internal - */ -export function registerCustomQueryHandler(name, handler) { - if (_queryHandlers.get(name)) { - throw new Error(`A custom query handler named "${name}" already exists`); - } - const isValidName = /^[a-zA-Z]+$/.test(name); - if (!isValidName) { - throw new Error(`Custom query handler names may only contain [a-zA-Z]`); - } - const internalHandler = makeQueryHandler(handler); - _queryHandlers.set(name, internalHandler); -} -/** - * @internal - */ -export function unregisterCustomQueryHandler(name) { - if (_queryHandlers.has(name) && !_builtInHandlers.has(name)) { - _queryHandlers.delete(name); - } -} -/** - * @internal - */ -export function customQueryHandlerNames() { - return [..._queryHandlers.keys()].filter((name) => - !_builtInHandlers.has(name) - ); -} -/** - * @internal - */ -export function clearCustomQueryHandlers() { - customQueryHandlerNames().forEach(unregisterCustomQueryHandler); -} -/** - * @internal - */ -export function getQueryHandlerAndSelector(selector) { - const hasCustomQueryHandler = /^[a-zA-Z]+\//.test(selector); - if (!hasCustomQueryHandler) { - return { updatedSelector: selector, queryHandler: _defaultHandler }; - } - const index = selector.indexOf("/"); - const name = selector.slice(0, index); - const updatedSelector = selector.slice(index + 1); - const queryHandler = _queryHandlers.get(name); - if (!queryHandler) { - throw new Error( - `Query set to use "${name}", but no query handler of that name was found`, - ); - } - return { - updatedSelector, - queryHandler, - }; -} -//# sourceMappingURL=QueryHandler.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/SecurityDetails.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/SecurityDetails.d.ts deleted file mode 100644 index 3783ad1558c..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/SecurityDetails.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Protocol } from "../../vendor/devtools-protocol/types/protocol.d.ts"; -/** - * The SecurityDetails class represents the security details of a - * response that was received over a secure connection. - * - * @public - */ -export declare class SecurityDetails { - private _subjectName; - private _issuer; - private _validFrom; - private _validTo; - private _protocol; - private _sanList; - /** - * @internal - */ - constructor(securityPayload: Protocol.Network.SecurityDetails); - /** - * @returns The name of the issuer of the certificate. - */ - issuer(): string; - /** - * @returns {@link https://en.wikipedia.org/wiki/Unix_time | Unix timestamp} - * marking the start of the certificate's validity. - */ - validFrom(): number; - /** - * @returns {@link https://en.wikipedia.org/wiki/Unix_time | Unix timestamp} - * marking the end of the certificate's validity. - */ - validTo(): number; - /** - * @returns The security protocol being used, e.g. "TLS 1.2". - */ - protocol(): string; - /** - * @returns The name of the subject to which the certificate was issued. - */ - subjectName(): string; - /** - * @returns The list of {@link https://en.wikipedia.org/wiki/Subject_Alternative_Name | subject alternative names (SANs)} of the certificate. - */ - subjectAlternativeNames(): string[]; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/SecurityDetails.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/SecurityDetails.js deleted file mode 100644 index 5af376ce68b..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/SecurityDetails.js +++ /dev/null @@ -1,74 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * The SecurityDetails class represents the security details of a - * response that was received over a secure connection. - * - * @public - */ -export class SecurityDetails { - /** - * @internal - */ - constructor(securityPayload) { - this._subjectName = securityPayload.subjectName; - this._issuer = securityPayload.issuer; - this._validFrom = securityPayload.validFrom; - this._validTo = securityPayload.validTo; - this._protocol = securityPayload.protocol; - this._sanList = securityPayload.sanList; - } - /** - * @returns The name of the issuer of the certificate. - */ - issuer() { - return this._issuer; - } - /** - * @returns {@link https://en.wikipedia.org/wiki/Unix_time | Unix timestamp} - * marking the start of the certificate's validity. - */ - validFrom() { - return this._validFrom; - } - /** - * @returns {@link https://en.wikipedia.org/wiki/Unix_time | Unix timestamp} - * marking the end of the certificate's validity. - */ - validTo() { - return this._validTo; - } - /** - * @returns The security protocol being used, e.g. "TLS 1.2". - */ - protocol() { - return this._protocol; - } - /** - * @returns The name of the subject to which the certificate was issued. - */ - subjectName() { - return this._subjectName; - } - /** - * @returns The list of {@link https://en.wikipedia.org/wiki/Subject_Alternative_Name | subject alternative names (SANs)} of the certificate. - */ - subjectAlternativeNames() { - return this._sanList; - } -} -//# sourceMappingURL=SecurityDetails.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Target.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Target.d.ts deleted file mode 100644 index c6132cc8f77..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Target.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright 2019 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Page } from "./Page.js"; -import { WebWorker } from "./WebWorker.js"; -import { CDPSession } from "./Connection.js"; -import { Browser, BrowserContext } from "./Browser.js"; -import { Viewport } from "./PuppeteerViewport.js"; -import { Protocol } from "../../vendor/devtools-protocol/types/protocol.d.ts"; -/** - * @public - */ -export declare class Target { - private _targetInfo; - private _browserContext; - private _sessionFactory; - private _ignoreHTTPSErrors; - private _defaultViewport?; - private _pagePromise?; - private _workerPromise?; - /** - * @internal - */ - _initializedPromise: Promise; - /** - * @internal - */ - _initializedCallback: (x: boolean) => void; - /** - * @internal - */ - _isClosedPromise: Promise; - /** - * @internal - */ - _closedCallback: () => void; - /** - * @internal - */ - _isInitialized: boolean; - /** - * @internal - */ - _targetId: string; - /** - * @internal - */ - constructor( - targetInfo: Protocol.Target.TargetInfo, - browserContext: BrowserContext, - sessionFactory: () => Promise, - ignoreHTTPSErrors: boolean, - defaultViewport: Viewport | null, - ); - /** - * Creates a Chrome Devtools Protocol session attached to the target. - */ - createCDPSession(): Promise; - /** - * If the target is not of type `"page"` or `"background_page"`, returns `null`. - */ - page(): Promise; - /** - * If the target is not of type `"service_worker"` or `"shared_worker"`, returns `null`. - */ - worker(): Promise; - url(): string; - /** - * Identifies what kind of target this is. - * - * @remarks - * - * See {@link https://developer.chrome.com/extensions/background_pages | docs} for more info about background pages. - */ - type(): - | "page" - | "background_page" - | "service_worker" - | "shared_worker" - | "other" - | "browser" - | "webview"; - /** - * Get the browser the target belongs to. - */ - browser(): Browser; - browserContext(): BrowserContext; - /** - * Get the target that opened this target. Top-level targets return `null`. - */ - opener(): Target | null; - /** - * @internal - */ - _targetInfoChanged(targetInfo: Protocol.Target.TargetInfo): void; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Target.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Target.js deleted file mode 100644 index 6bc9d025578..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Target.js +++ /dev/null @@ -1,178 +0,0 @@ -/// -/** - * Copyright 2019 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Page } from "./Page.js"; -import { WebWorker } from "./WebWorker.js"; -/** - * @public - */ -export class Target { - /** - * @internal - */ - constructor( - targetInfo, - browserContext, - sessionFactory, - ignoreHTTPSErrors, - defaultViewport, - ) { - this._targetInfo = targetInfo; - this._browserContext = browserContext; - this._targetId = targetInfo.targetId; - this._sessionFactory = sessionFactory; - this._ignoreHTTPSErrors = ignoreHTTPSErrors; - this._defaultViewport = defaultViewport; - /** @type {?Promise} */ - this._pagePromise = null; - /** @type {?Promise} */ - this._workerPromise = null; - this._initializedPromise = new Promise(( - fulfill, - ) => (this._initializedCallback = fulfill)).then(async (success) => { - if (!success) { - return false; - } - const opener = this.opener(); - if (!opener || !opener._pagePromise || this.type() !== "page") { - return true; - } - const openerPage = await opener._pagePromise; - if (!openerPage.listenerCount("popup" /* Popup */)) { - return true; - } - const popupPage = await this.page(); - openerPage.emit("popup", /* Popup */ popupPage); - return true; - }); - this._isClosedPromise = new Promise(( - fulfill, - ) => (this._closedCallback = fulfill)); - this._isInitialized = this._targetInfo.type !== "page" || - this._targetInfo.url !== ""; - if (this._isInitialized) { - this._initializedCallback(true); - } - } - /** - * Creates a Chrome Devtools Protocol session attached to the target. - */ - createCDPSession() { - return this._sessionFactory(); - } - /** - * If the target is not of type `"page"` or `"background_page"`, returns `null`. - */ - async page() { - if ( - (this._targetInfo.type === "page" || - this._targetInfo.type === "background_page" || - this._targetInfo.type === "webview") && - !this._pagePromise - ) { - this._pagePromise = this._sessionFactory().then((client) => - Page.create( - client, - this, - this._ignoreHTTPSErrors, - this._defaultViewport, - ) - ); - } - return this._pagePromise; - } - /** - * If the target is not of type `"service_worker"` or `"shared_worker"`, returns `null`. - */ - async worker() { - if ( - this._targetInfo.type !== "service_worker" && - this._targetInfo.type !== "shared_worker" - ) { - return null; - } - if (!this._workerPromise) { - // TODO(einbinder): Make workers send their console logs. - this._workerPromise = this._sessionFactory().then((client) => - new WebWorker( - client, - this._targetInfo.url, - () => {}, /* consoleAPICalled */ - () => {}, /* exceptionThrown */ - ) - ); - } - return this._workerPromise; - } - url() { - return this._targetInfo.url; - } - /** - * Identifies what kind of target this is. - * - * @remarks - * - * See {@link https://developer.chrome.com/extensions/background_pages | docs} for more info about background pages. - */ - type() { - const type = this._targetInfo.type; - if ( - type === "page" || - type === "background_page" || - type === "service_worker" || - type === "shared_worker" || - type === "browser" || - type === "webview" - ) { - return type; - } - return "other"; - } - /** - * Get the browser the target belongs to. - */ - browser() { - return this._browserContext.browser(); - } - browserContext() { - return this._browserContext; - } - /** - * Get the target that opened this target. Top-level targets return `null`. - */ - opener() { - const { openerId } = this._targetInfo; - if (!openerId) { - return null; - } - return this.browser()._targets.get(openerId); - } - /** - * @internal - */ - _targetInfoChanged(targetInfo) { - this._targetInfo = targetInfo; - if ( - !this._isInitialized && - (this._targetInfo.type !== "page" || this._targetInfo.url !== "") - ) { - this._isInitialized = true; - this._initializedCallback(true); - return; - } - } -} -//# sourceMappingURL=Target.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/TimeoutSettings.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/TimeoutSettings.d.ts deleted file mode 100644 index 402df7d27ff..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/TimeoutSettings.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright 2019 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @internal - */ -export declare class TimeoutSettings { - _defaultTimeout: number | null; - _defaultNavigationTimeout: number | null; - constructor(); - setDefaultTimeout(timeout: number): void; - setDefaultNavigationTimeout(timeout: number): void; - navigationTimeout(): number; - timeout(): number; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/TimeoutSettings.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/TimeoutSettings.js deleted file mode 100644 index 25bef581c79..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/TimeoutSettings.js +++ /dev/null @@ -1,48 +0,0 @@ -/// -/** - * Copyright 2019 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const DEFAULT_TIMEOUT = 30000; -/** - * @internal - */ -export class TimeoutSettings { - constructor() { - this._defaultTimeout = null; - this._defaultNavigationTimeout = null; - } - setDefaultTimeout(timeout) { - this._defaultTimeout = timeout; - } - setDefaultNavigationTimeout(timeout) { - this._defaultNavigationTimeout = timeout; - } - navigationTimeout() { - if (this._defaultNavigationTimeout !== null) { - return this._defaultNavigationTimeout; - } - if (this._defaultTimeout !== null) { - return this._defaultTimeout; - } - return DEFAULT_TIMEOUT; - } - timeout() { - if (this._defaultTimeout !== null) { - return this._defaultTimeout; - } - return DEFAULT_TIMEOUT; - } -} -//# sourceMappingURL=TimeoutSettings.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Tracing.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Tracing.d.ts deleted file mode 100644 index 4bbe636dc20..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Tracing.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { CDPSession } from "./Connection.js"; -/** - * @public - */ -export interface TracingOptions { - path?: string; - screenshots?: boolean; - categories?: string[]; -} -/** - * The Tracing class exposes the tracing audit interface. - * @remarks - * You can use `tracing.start` and `tracing.stop` to create a trace file - * which can be opened in Chrome DevTools or {@link https://chromedevtools.github.io/timeline-viewer/ | timeline viewer}. - * - * @example - * ```js - * await page.tracing.start({path: 'trace.json'}); - * await page.goto('https://www.google.com'); - * await page.tracing.stop(); - * ``` - * - * @public - */ -export declare class Tracing { - _client: CDPSession; - _recording: boolean; - _path: string; - /** - * @internal - */ - constructor(client: CDPSession); - /** - * Starts a trace for the current page. - * @remarks - * Only one trace can be active at a time per browser. - * @param options - Optional `TracingOptions`. - */ - start(options?: TracingOptions): Promise; - /** - * Stops a trace started with the `start` method. - * @returns Promise which resolves to buffer with trace data. - */ - stop(): Promise; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Tracing.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Tracing.js deleted file mode 100644 index 936e0164185..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/Tracing.js +++ /dev/null @@ -1,101 +0,0 @@ -/// -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { assert } from "./assert.js"; -import { helper } from "./helper.js"; -/** - * The Tracing class exposes the tracing audit interface. - * @remarks - * You can use `tracing.start` and `tracing.stop` to create a trace file - * which can be opened in Chrome DevTools or {@link https://chromedevtools.github.io/timeline-viewer/ | timeline viewer}. - * - * @example - * ```js - * await page.tracing.start({path: 'trace.json'}); - * await page.goto('https://www.google.com'); - * await page.tracing.stop(); - * ``` - * - * @public - */ -export class Tracing { - /** - * @internal - */ - constructor(client) { - this._recording = false; - this._path = ""; - this._client = client; - } - /** - * Starts a trace for the current page. - * @remarks - * Only one trace can be active at a time per browser. - * @param options - Optional `TracingOptions`. - */ - async start(options = {}) { - assert( - !this._recording, - "Cannot start recording trace while already recording trace.", - ); - const defaultCategories = [ - "-*", - "devtools.timeline", - "v8.execute", - "disabled-by-default-devtools.timeline", - "disabled-by-default-devtools.timeline.frame", - "toplevel", - "blink.console", - "blink.user_timing", - "latencyInfo", - "disabled-by-default-devtools.timeline.stack", - "disabled-by-default-v8.cpu_profiler", - "disabled-by-default-v8.cpu_profiler.hires", - ]; - const { path = null, screenshots = false, categories = defaultCategories } = - options; - if (screenshots) { - categories.push("disabled-by-default-devtools.screenshot"); - } - this._path = path; - this._recording = true; - await this._client.send("Tracing.start", { - transferMode: "ReturnAsStream", - categories: categories.join(","), - }); - } - /** - * Stops a trace started with the `start` method. - * @returns Promise which resolves to buffer with trace data. - */ - async stop() { - let fulfill; - let reject; - const contentPromise = new Promise((x, y) => { - fulfill = x; - reject = y; - }); - this._client.once("Tracing.tracingComplete", (event) => { - helper - .readProtocolStream(this._client, event.stream, this._path) - .then(fulfill, reject); - }); - await this._client.send("Tracing.end"); - this._recording = false; - return contentPromise; - } -} -//# sourceMappingURL=Tracing.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/USKeyboardLayout.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/USKeyboardLayout.d.ts deleted file mode 100644 index 763ac8d8179..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/USKeyboardLayout.d.ts +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @internal - */ -export interface KeyDefinition { - keyCode?: number; - shiftKeyCode?: number; - key?: string; - shiftKey?: string; - code?: string; - text?: string; - shiftText?: string; - location?: number; -} -/** - * All the valid keys that can be passed to functions that take user input, such - * as {@link Keyboard.press | keyboard.press } - * - * @public - */ -export declare type KeyInput = - | "0" - | "1" - | "2" - | "3" - | "4" - | "5" - | "6" - | "7" - | "8" - | "9" - | "Power" - | "Eject" - | "Abort" - | "Help" - | "Backspace" - | "Tab" - | "Numpad5" - | "NumpadEnter" - | "Enter" - | "\r" - | "\n" - | "ShiftLeft" - | "ShiftRight" - | "ControlLeft" - | "ControlRight" - | "AltLeft" - | "AltRight" - | "Pause" - | "CapsLock" - | "Escape" - | "Convert" - | "NonConvert" - | "Space" - | "Numpad9" - | "PageUp" - | "Numpad3" - | "PageDown" - | "End" - | "Numpad1" - | "Home" - | "Numpad7" - | "ArrowLeft" - | "Numpad4" - | "Numpad8" - | "ArrowUp" - | "ArrowRight" - | "Numpad6" - | "Numpad2" - | "ArrowDown" - | "Select" - | "Open" - | "PrintScreen" - | "Insert" - | "Numpad0" - | "Delete" - | "NumpadDecimal" - | "Digit0" - | "Digit1" - | "Digit2" - | "Digit3" - | "Digit4" - | "Digit5" - | "Digit6" - | "Digit7" - | "Digit8" - | "Digit9" - | "KeyA" - | "KeyB" - | "KeyC" - | "KeyD" - | "KeyE" - | "KeyF" - | "KeyG" - | "KeyH" - | "KeyI" - | "KeyJ" - | "KeyK" - | "KeyL" - | "KeyM" - | "KeyN" - | "KeyO" - | "KeyP" - | "KeyQ" - | "KeyR" - | "KeyS" - | "KeyT" - | "KeyU" - | "KeyV" - | "KeyW" - | "KeyX" - | "KeyY" - | "KeyZ" - | "MetaLeft" - | "MetaRight" - | "ContextMenu" - | "NumpadMultiply" - | "NumpadAdd" - | "NumpadSubtract" - | "NumpadDivide" - | "F1" - | "F2" - | "F3" - | "F4" - | "F5" - | "F6" - | "F7" - | "F8" - | "F9" - | "F10" - | "F11" - | "F12" - | "F13" - | "F14" - | "F15" - | "F16" - | "F17" - | "F18" - | "F19" - | "F20" - | "F21" - | "F22" - | "F23" - | "F24" - | "NumLock" - | "ScrollLock" - | "AudioVolumeMute" - | "AudioVolumeDown" - | "AudioVolumeUp" - | "MediaTrackNext" - | "MediaTrackPrevious" - | "MediaStop" - | "MediaPlayPause" - | "Semicolon" - | "Equal" - | "NumpadEqual" - | "Comma" - | "Minus" - | "Period" - | "Slash" - | "Backquote" - | "BracketLeft" - | "Backslash" - | "BracketRight" - | "Quote" - | "AltGraph" - | "Props" - | "Cancel" - | "Clear" - | "Shift" - | "Control" - | "Alt" - | "Accept" - | "ModeChange" - | " " - | "Print" - | "Execute" - | "\u0000" - | "a" - | "b" - | "c" - | "d" - | "e" - | "f" - | "g" - | "h" - | "i" - | "j" - | "k" - | "l" - | "m" - | "n" - | "o" - | "p" - | "q" - | "r" - | "s" - | "t" - | "u" - | "v" - | "w" - | "x" - | "y" - | "z" - | "Meta" - | "*" - | "+" - | "-" - | "/" - | ";" - | "=" - | "," - | "." - | "`" - | "[" - | "\\" - | "]" - | "'" - | "Attn" - | "CrSel" - | "ExSel" - | "EraseEof" - | "Play" - | "ZoomOut" - | ")" - | "!" - | "@" - | "#" - | "$" - | "%" - | "^" - | "&" - | "(" - | "A" - | "B" - | "C" - | "D" - | "E" - | "F" - | "G" - | "H" - | "I" - | "J" - | "K" - | "L" - | "M" - | "N" - | "O" - | "P" - | "Q" - | "R" - | "S" - | "T" - | "U" - | "V" - | "W" - | "X" - | "Y" - | "Z" - | ":" - | "<" - | "_" - | ">" - | "?" - | "~" - | "{" - | "|" - | "}" - | '"' - | "SoftLeft" - | "SoftRight" - | "Camera" - | "Call" - | "EndCall" - | "VolumeDown" - | "VolumeUp"; -/** - * @internal - */ -export declare const keyDefinitions: Readonly>; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/USKeyboardLayout.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/USKeyboardLayout.js deleted file mode 100644 index 99ef26a4b47..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/USKeyboardLayout.js +++ /dev/null @@ -1,405 +0,0 @@ -/// -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @internal - */ -export const keyDefinitions = { - "0": { keyCode: 48, key: "0", code: "Digit0" }, - "1": { keyCode: 49, key: "1", code: "Digit1" }, - "2": { keyCode: 50, key: "2", code: "Digit2" }, - "3": { keyCode: 51, key: "3", code: "Digit3" }, - "4": { keyCode: 52, key: "4", code: "Digit4" }, - "5": { keyCode: 53, key: "5", code: "Digit5" }, - "6": { keyCode: 54, key: "6", code: "Digit6" }, - "7": { keyCode: 55, key: "7", code: "Digit7" }, - "8": { keyCode: 56, key: "8", code: "Digit8" }, - "9": { keyCode: 57, key: "9", code: "Digit9" }, - Power: { key: "Power", code: "Power" }, - Eject: { key: "Eject", code: "Eject" }, - Abort: { keyCode: 3, code: "Abort", key: "Cancel" }, - Help: { keyCode: 6, code: "Help", key: "Help" }, - Backspace: { keyCode: 8, code: "Backspace", key: "Backspace" }, - Tab: { keyCode: 9, code: "Tab", key: "Tab" }, - Numpad5: { - keyCode: 12, - shiftKeyCode: 101, - key: "Clear", - code: "Numpad5", - shiftKey: "5", - location: 3, - }, - NumpadEnter: { - keyCode: 13, - code: "NumpadEnter", - key: "Enter", - text: "\r", - location: 3, - }, - Enter: { keyCode: 13, code: "Enter", key: "Enter", text: "\r" }, - "\r": { keyCode: 13, code: "Enter", key: "Enter", text: "\r" }, - "\n": { keyCode: 13, code: "Enter", key: "Enter", text: "\r" }, - ShiftLeft: { keyCode: 16, code: "ShiftLeft", key: "Shift", location: 1 }, - ShiftRight: { keyCode: 16, code: "ShiftRight", key: "Shift", location: 2 }, - ControlLeft: { - keyCode: 17, - code: "ControlLeft", - key: "Control", - location: 1, - }, - ControlRight: { - keyCode: 17, - code: "ControlRight", - key: "Control", - location: 2, - }, - AltLeft: { keyCode: 18, code: "AltLeft", key: "Alt", location: 1 }, - AltRight: { keyCode: 18, code: "AltRight", key: "Alt", location: 2 }, - Pause: { keyCode: 19, code: "Pause", key: "Pause" }, - CapsLock: { keyCode: 20, code: "CapsLock", key: "CapsLock" }, - Escape: { keyCode: 27, code: "Escape", key: "Escape" }, - Convert: { keyCode: 28, code: "Convert", key: "Convert" }, - NonConvert: { keyCode: 29, code: "NonConvert", key: "NonConvert" }, - Space: { keyCode: 32, code: "Space", key: " " }, - Numpad9: { - keyCode: 33, - shiftKeyCode: 105, - key: "PageUp", - code: "Numpad9", - shiftKey: "9", - location: 3, - }, - PageUp: { keyCode: 33, code: "PageUp", key: "PageUp" }, - Numpad3: { - keyCode: 34, - shiftKeyCode: 99, - key: "PageDown", - code: "Numpad3", - shiftKey: "3", - location: 3, - }, - PageDown: { keyCode: 34, code: "PageDown", key: "PageDown" }, - End: { keyCode: 35, code: "End", key: "End" }, - Numpad1: { - keyCode: 35, - shiftKeyCode: 97, - key: "End", - code: "Numpad1", - shiftKey: "1", - location: 3, - }, - Home: { keyCode: 36, code: "Home", key: "Home" }, - Numpad7: { - keyCode: 36, - shiftKeyCode: 103, - key: "Home", - code: "Numpad7", - shiftKey: "7", - location: 3, - }, - ArrowLeft: { keyCode: 37, code: "ArrowLeft", key: "ArrowLeft" }, - Numpad4: { - keyCode: 37, - shiftKeyCode: 100, - key: "ArrowLeft", - code: "Numpad4", - shiftKey: "4", - location: 3, - }, - Numpad8: { - keyCode: 38, - shiftKeyCode: 104, - key: "ArrowUp", - code: "Numpad8", - shiftKey: "8", - location: 3, - }, - ArrowUp: { keyCode: 38, code: "ArrowUp", key: "ArrowUp" }, - ArrowRight: { keyCode: 39, code: "ArrowRight", key: "ArrowRight" }, - Numpad6: { - keyCode: 39, - shiftKeyCode: 102, - key: "ArrowRight", - code: "Numpad6", - shiftKey: "6", - location: 3, - }, - Numpad2: { - keyCode: 40, - shiftKeyCode: 98, - key: "ArrowDown", - code: "Numpad2", - shiftKey: "2", - location: 3, - }, - ArrowDown: { keyCode: 40, code: "ArrowDown", key: "ArrowDown" }, - Select: { keyCode: 41, code: "Select", key: "Select" }, - Open: { keyCode: 43, code: "Open", key: "Execute" }, - PrintScreen: { keyCode: 44, code: "PrintScreen", key: "PrintScreen" }, - Insert: { keyCode: 45, code: "Insert", key: "Insert" }, - Numpad0: { - keyCode: 45, - shiftKeyCode: 96, - key: "Insert", - code: "Numpad0", - shiftKey: "0", - location: 3, - }, - Delete: { keyCode: 46, code: "Delete", key: "Delete" }, - NumpadDecimal: { - keyCode: 46, - shiftKeyCode: 110, - code: "NumpadDecimal", - key: "\u0000", - shiftKey: ".", - location: 3, - }, - Digit0: { keyCode: 48, code: "Digit0", shiftKey: ")", key: "0" }, - Digit1: { keyCode: 49, code: "Digit1", shiftKey: "!", key: "1" }, - Digit2: { keyCode: 50, code: "Digit2", shiftKey: "@", key: "2" }, - Digit3: { keyCode: 51, code: "Digit3", shiftKey: "#", key: "3" }, - Digit4: { keyCode: 52, code: "Digit4", shiftKey: "$", key: "4" }, - Digit5: { keyCode: 53, code: "Digit5", shiftKey: "%", key: "5" }, - Digit6: { keyCode: 54, code: "Digit6", shiftKey: "^", key: "6" }, - Digit7: { keyCode: 55, code: "Digit7", shiftKey: "&", key: "7" }, - Digit8: { keyCode: 56, code: "Digit8", shiftKey: "*", key: "8" }, - Digit9: { keyCode: 57, code: "Digit9", shiftKey: "(", key: "9" }, - KeyA: { keyCode: 65, code: "KeyA", shiftKey: "A", key: "a" }, - KeyB: { keyCode: 66, code: "KeyB", shiftKey: "B", key: "b" }, - KeyC: { keyCode: 67, code: "KeyC", shiftKey: "C", key: "c" }, - KeyD: { keyCode: 68, code: "KeyD", shiftKey: "D", key: "d" }, - KeyE: { keyCode: 69, code: "KeyE", shiftKey: "E", key: "e" }, - KeyF: { keyCode: 70, code: "KeyF", shiftKey: "F", key: "f" }, - KeyG: { keyCode: 71, code: "KeyG", shiftKey: "G", key: "g" }, - KeyH: { keyCode: 72, code: "KeyH", shiftKey: "H", key: "h" }, - KeyI: { keyCode: 73, code: "KeyI", shiftKey: "I", key: "i" }, - KeyJ: { keyCode: 74, code: "KeyJ", shiftKey: "J", key: "j" }, - KeyK: { keyCode: 75, code: "KeyK", shiftKey: "K", key: "k" }, - KeyL: { keyCode: 76, code: "KeyL", shiftKey: "L", key: "l" }, - KeyM: { keyCode: 77, code: "KeyM", shiftKey: "M", key: "m" }, - KeyN: { keyCode: 78, code: "KeyN", shiftKey: "N", key: "n" }, - KeyO: { keyCode: 79, code: "KeyO", shiftKey: "O", key: "o" }, - KeyP: { keyCode: 80, code: "KeyP", shiftKey: "P", key: "p" }, - KeyQ: { keyCode: 81, code: "KeyQ", shiftKey: "Q", key: "q" }, - KeyR: { keyCode: 82, code: "KeyR", shiftKey: "R", key: "r" }, - KeyS: { keyCode: 83, code: "KeyS", shiftKey: "S", key: "s" }, - KeyT: { keyCode: 84, code: "KeyT", shiftKey: "T", key: "t" }, - KeyU: { keyCode: 85, code: "KeyU", shiftKey: "U", key: "u" }, - KeyV: { keyCode: 86, code: "KeyV", shiftKey: "V", key: "v" }, - KeyW: { keyCode: 87, code: "KeyW", shiftKey: "W", key: "w" }, - KeyX: { keyCode: 88, code: "KeyX", shiftKey: "X", key: "x" }, - KeyY: { keyCode: 89, code: "KeyY", shiftKey: "Y", key: "y" }, - KeyZ: { keyCode: 90, code: "KeyZ", shiftKey: "Z", key: "z" }, - MetaLeft: { keyCode: 91, code: "MetaLeft", key: "Meta", location: 1 }, - MetaRight: { keyCode: 92, code: "MetaRight", key: "Meta", location: 2 }, - ContextMenu: { keyCode: 93, code: "ContextMenu", key: "ContextMenu" }, - NumpadMultiply: { - keyCode: 106, - code: "NumpadMultiply", - key: "*", - location: 3, - }, - NumpadAdd: { keyCode: 107, code: "NumpadAdd", key: "+", location: 3 }, - NumpadSubtract: { - keyCode: 109, - code: "NumpadSubtract", - key: "-", - location: 3, - }, - NumpadDivide: { keyCode: 111, code: "NumpadDivide", key: "/", location: 3 }, - F1: { keyCode: 112, code: "F1", key: "F1" }, - F2: { keyCode: 113, code: "F2", key: "F2" }, - F3: { keyCode: 114, code: "F3", key: "F3" }, - F4: { keyCode: 115, code: "F4", key: "F4" }, - F5: { keyCode: 116, code: "F5", key: "F5" }, - F6: { keyCode: 117, code: "F6", key: "F6" }, - F7: { keyCode: 118, code: "F7", key: "F7" }, - F8: { keyCode: 119, code: "F8", key: "F8" }, - F9: { keyCode: 120, code: "F9", key: "F9" }, - F10: { keyCode: 121, code: "F10", key: "F10" }, - F11: { keyCode: 122, code: "F11", key: "F11" }, - F12: { keyCode: 123, code: "F12", key: "F12" }, - F13: { keyCode: 124, code: "F13", key: "F13" }, - F14: { keyCode: 125, code: "F14", key: "F14" }, - F15: { keyCode: 126, code: "F15", key: "F15" }, - F16: { keyCode: 127, code: "F16", key: "F16" }, - F17: { keyCode: 128, code: "F17", key: "F17" }, - F18: { keyCode: 129, code: "F18", key: "F18" }, - F19: { keyCode: 130, code: "F19", key: "F19" }, - F20: { keyCode: 131, code: "F20", key: "F20" }, - F21: { keyCode: 132, code: "F21", key: "F21" }, - F22: { keyCode: 133, code: "F22", key: "F22" }, - F23: { keyCode: 134, code: "F23", key: "F23" }, - F24: { keyCode: 135, code: "F24", key: "F24" }, - NumLock: { keyCode: 144, code: "NumLock", key: "NumLock" }, - ScrollLock: { keyCode: 145, code: "ScrollLock", key: "ScrollLock" }, - AudioVolumeMute: { - keyCode: 173, - code: "AudioVolumeMute", - key: "AudioVolumeMute", - }, - AudioVolumeDown: { - keyCode: 174, - code: "AudioVolumeDown", - key: "AudioVolumeDown", - }, - AudioVolumeUp: { keyCode: 175, code: "AudioVolumeUp", key: "AudioVolumeUp" }, - MediaTrackNext: { - keyCode: 176, - code: "MediaTrackNext", - key: "MediaTrackNext", - }, - MediaTrackPrevious: { - keyCode: 177, - code: "MediaTrackPrevious", - key: "MediaTrackPrevious", - }, - MediaStop: { keyCode: 178, code: "MediaStop", key: "MediaStop" }, - MediaPlayPause: { - keyCode: 179, - code: "MediaPlayPause", - key: "MediaPlayPause", - }, - Semicolon: { keyCode: 186, code: "Semicolon", shiftKey: ":", key: ";" }, - Equal: { keyCode: 187, code: "Equal", shiftKey: "+", key: "=" }, - NumpadEqual: { keyCode: 187, code: "NumpadEqual", key: "=", location: 3 }, - Comma: { keyCode: 188, code: "Comma", shiftKey: "<", key: "," }, - Minus: { keyCode: 189, code: "Minus", shiftKey: "_", key: "-" }, - Period: { keyCode: 190, code: "Period", shiftKey: ">", key: "." }, - Slash: { keyCode: 191, code: "Slash", shiftKey: "?", key: "/" }, - Backquote: { keyCode: 192, code: "Backquote", shiftKey: "~", key: "`" }, - BracketLeft: { keyCode: 219, code: "BracketLeft", shiftKey: "{", key: "[" }, - Backslash: { keyCode: 220, code: "Backslash", shiftKey: "|", key: "\\" }, - BracketRight: { keyCode: 221, code: "BracketRight", shiftKey: "}", key: "]" }, - Quote: { keyCode: 222, code: "Quote", shiftKey: '"', key: "'" }, - AltGraph: { keyCode: 225, code: "AltGraph", key: "AltGraph" }, - Props: { keyCode: 247, code: "Props", key: "CrSel" }, - Cancel: { keyCode: 3, key: "Cancel", code: "Abort" }, - Clear: { keyCode: 12, key: "Clear", code: "Numpad5", location: 3 }, - Shift: { keyCode: 16, key: "Shift", code: "ShiftLeft", location: 1 }, - Control: { keyCode: 17, key: "Control", code: "ControlLeft", location: 1 }, - Alt: { keyCode: 18, key: "Alt", code: "AltLeft", location: 1 }, - Accept: { keyCode: 30, key: "Accept" }, - ModeChange: { keyCode: 31, key: "ModeChange" }, - " ": { keyCode: 32, key: " ", code: "Space" }, - Print: { keyCode: 42, key: "Print" }, - Execute: { keyCode: 43, key: "Execute", code: "Open" }, - "\u0000": { keyCode: 46, key: "\u0000", code: "NumpadDecimal", location: 3 }, - a: { keyCode: 65, key: "a", code: "KeyA" }, - b: { keyCode: 66, key: "b", code: "KeyB" }, - c: { keyCode: 67, key: "c", code: "KeyC" }, - d: { keyCode: 68, key: "d", code: "KeyD" }, - e: { keyCode: 69, key: "e", code: "KeyE" }, - f: { keyCode: 70, key: "f", code: "KeyF" }, - g: { keyCode: 71, key: "g", code: "KeyG" }, - h: { keyCode: 72, key: "h", code: "KeyH" }, - i: { keyCode: 73, key: "i", code: "KeyI" }, - j: { keyCode: 74, key: "j", code: "KeyJ" }, - k: { keyCode: 75, key: "k", code: "KeyK" }, - l: { keyCode: 76, key: "l", code: "KeyL" }, - m: { keyCode: 77, key: "m", code: "KeyM" }, - n: { keyCode: 78, key: "n", code: "KeyN" }, - o: { keyCode: 79, key: "o", code: "KeyO" }, - p: { keyCode: 80, key: "p", code: "KeyP" }, - q: { keyCode: 81, key: "q", code: "KeyQ" }, - r: { keyCode: 82, key: "r", code: "KeyR" }, - s: { keyCode: 83, key: "s", code: "KeyS" }, - t: { keyCode: 84, key: "t", code: "KeyT" }, - u: { keyCode: 85, key: "u", code: "KeyU" }, - v: { keyCode: 86, key: "v", code: "KeyV" }, - w: { keyCode: 87, key: "w", code: "KeyW" }, - x: { keyCode: 88, key: "x", code: "KeyX" }, - y: { keyCode: 89, key: "y", code: "KeyY" }, - z: { keyCode: 90, key: "z", code: "KeyZ" }, - Meta: { keyCode: 91, key: "Meta", code: "MetaLeft", location: 1 }, - "*": { keyCode: 106, key: "*", code: "NumpadMultiply", location: 3 }, - "+": { keyCode: 107, key: "+", code: "NumpadAdd", location: 3 }, - "-": { keyCode: 109, key: "-", code: "NumpadSubtract", location: 3 }, - "/": { keyCode: 111, key: "/", code: "NumpadDivide", location: 3 }, - ";": { keyCode: 186, key: ";", code: "Semicolon" }, - "=": { keyCode: 187, key: "=", code: "Equal" }, - ",": { keyCode: 188, key: ",", code: "Comma" }, - ".": { keyCode: 190, key: ".", code: "Period" }, - "`": { keyCode: 192, key: "`", code: "Backquote" }, - "[": { keyCode: 219, key: "[", code: "BracketLeft" }, - "\\": { keyCode: 220, key: "\\", code: "Backslash" }, - "]": { keyCode: 221, key: "]", code: "BracketRight" }, - "'": { keyCode: 222, key: "'", code: "Quote" }, - Attn: { keyCode: 246, key: "Attn" }, - CrSel: { keyCode: 247, key: "CrSel", code: "Props" }, - ExSel: { keyCode: 248, key: "ExSel" }, - EraseEof: { keyCode: 249, key: "EraseEof" }, - Play: { keyCode: 250, key: "Play" }, - ZoomOut: { keyCode: 251, key: "ZoomOut" }, - ")": { keyCode: 48, key: ")", code: "Digit0" }, - "!": { keyCode: 49, key: "!", code: "Digit1" }, - "@": { keyCode: 50, key: "@", code: "Digit2" }, - "#": { keyCode: 51, key: "#", code: "Digit3" }, - $: { keyCode: 52, key: "$", code: "Digit4" }, - "%": { keyCode: 53, key: "%", code: "Digit5" }, - "^": { keyCode: 54, key: "^", code: "Digit6" }, - "&": { keyCode: 55, key: "&", code: "Digit7" }, - "(": { keyCode: 57, key: "(", code: "Digit9" }, - A: { keyCode: 65, key: "A", code: "KeyA" }, - B: { keyCode: 66, key: "B", code: "KeyB" }, - C: { keyCode: 67, key: "C", code: "KeyC" }, - D: { keyCode: 68, key: "D", code: "KeyD" }, - E: { keyCode: 69, key: "E", code: "KeyE" }, - F: { keyCode: 70, key: "F", code: "KeyF" }, - G: { keyCode: 71, key: "G", code: "KeyG" }, - H: { keyCode: 72, key: "H", code: "KeyH" }, - I: { keyCode: 73, key: "I", code: "KeyI" }, - J: { keyCode: 74, key: "J", code: "KeyJ" }, - K: { keyCode: 75, key: "K", code: "KeyK" }, - L: { keyCode: 76, key: "L", code: "KeyL" }, - M: { keyCode: 77, key: "M", code: "KeyM" }, - N: { keyCode: 78, key: "N", code: "KeyN" }, - O: { keyCode: 79, key: "O", code: "KeyO" }, - P: { keyCode: 80, key: "P", code: "KeyP" }, - Q: { keyCode: 81, key: "Q", code: "KeyQ" }, - R: { keyCode: 82, key: "R", code: "KeyR" }, - S: { keyCode: 83, key: "S", code: "KeyS" }, - T: { keyCode: 84, key: "T", code: "KeyT" }, - U: { keyCode: 85, key: "U", code: "KeyU" }, - V: { keyCode: 86, key: "V", code: "KeyV" }, - W: { keyCode: 87, key: "W", code: "KeyW" }, - X: { keyCode: 88, key: "X", code: "KeyX" }, - Y: { keyCode: 89, key: "Y", code: "KeyY" }, - Z: { keyCode: 90, key: "Z", code: "KeyZ" }, - ":": { keyCode: 186, key: ":", code: "Semicolon" }, - "<": { keyCode: 188, key: "<", code: "Comma" }, - _: { keyCode: 189, key: "_", code: "Minus" }, - ">": { keyCode: 190, key: ">", code: "Period" }, - "?": { keyCode: 191, key: "?", code: "Slash" }, - "~": { keyCode: 192, key: "~", code: "Backquote" }, - "{": { keyCode: 219, key: "{", code: "BracketLeft" }, - "|": { keyCode: 220, key: "|", code: "Backslash" }, - "}": { keyCode: 221, key: "}", code: "BracketRight" }, - '"': { keyCode: 222, key: '"', code: "Quote" }, - SoftLeft: { key: "SoftLeft", code: "SoftLeft", location: 4 }, - SoftRight: { key: "SoftRight", code: "SoftRight", location: 4 }, - Camera: { keyCode: 44, key: "Camera", code: "Camera", location: 4 }, - Call: { key: "Call", code: "Call", location: 4 }, - EndCall: { keyCode: 95, key: "EndCall", code: "EndCall", location: 4 }, - VolumeDown: { - keyCode: 182, - key: "VolumeDown", - code: "VolumeDown", - location: 4, - }, - VolumeUp: { keyCode: 183, key: "VolumeUp", code: "VolumeUp", location: 4 }, -}; -//# sourceMappingURL=USKeyboardLayout.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/WebWorker.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/WebWorker.d.ts deleted file mode 100644 index 9672ca186ff..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/WebWorker.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Copyright 2018 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { EventEmitter } from "./EventEmitter.js"; -import { ExecutionContext } from "./ExecutionContext.js"; -import { JSHandle } from "./JSHandle.js"; -import { CDPSession } from "./Connection.js"; -import { Protocol } from "../../vendor/devtools-protocol/types/protocol.d.ts"; -import { EvaluateHandleFn, SerializableOrJSHandle } from "./EvalTypes.js"; -/** - * @internal - */ -export declare type ConsoleAPICalledCallback = ( - eventType: string, - handles: JSHandle[], - trace: Protocol.Runtime.StackTrace, -) => void; -/** - * @internal - */ -export declare type ExceptionThrownCallback = ( - details: Protocol.Runtime.ExceptionDetails, -) => void; -/** - * The WebWorker class represents a - * {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorker}. - * - * @remarks - * The events `workercreated` and `workerdestroyed` are emitted on the page - * object to signal the worker lifecycle. - * - * @example - * ```js - * page.on('workercreated', worker => console.log('Worker created: ' + worker.url())); - * page.on('workerdestroyed', worker => console.log('Worker destroyed: ' + worker.url())); - * - * console.log('Current workers:'); - * for (const worker of page.workers()) { - * console.log(' ' + worker.url()); - * } - * ``` - * - * @public - */ -export declare class WebWorker extends EventEmitter { - _client: CDPSession; - _url: string; - _executionContextPromise: Promise; - _executionContextCallback: (value: ExecutionContext) => void; - /** - * - * @internal - */ - constructor( - client: CDPSession, - url: string, - consoleAPICalled: ConsoleAPICalledCallback, - exceptionThrown: ExceptionThrownCallback, - ); - /** - * @returns The URL of this web worker. - */ - url(): string; - /** - * Returns the ExecutionContext the WebWorker runs in - * @returns The ExecutionContext the web worker runs in. - */ - executionContext(): Promise; - /** - * If the function passed to the `worker.evaluate` returns a Promise, then - * `worker.evaluate` would wait for the promise to resolve and return its - * value. If the function passed to the `worker.evaluate` returns a - * non-serializable value, then `worker.evaluate` resolves to `undefined`. - * DevTools Protocol also supports transferring some additional values that - * are not serializable by `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`, and - * bigint literals. - * Shortcut for `await worker.executionContext()).evaluate(pageFunction, ...args)`. - * - * @param pageFunction - Function to be evaluated in the worker context. - * @param args - Arguments to pass to `pageFunction`. - * @returns Promise which resolves to the return value of `pageFunction`. - */ - evaluate( - pageFunction: Function | string, - ...args: any[] - ): Promise; - /** - * The only difference between `worker.evaluate` and `worker.evaluateHandle` - * is that `worker.evaluateHandle` returns in-page object (JSHandle). If the - * function passed to the `worker.evaluateHandle` returns a [Promise], then - * `worker.evaluateHandle` would wait for the promise to resolve and return - * its value. Shortcut for - * `await worker.executionContext()).evaluateHandle(pageFunction, ...args)` - * - * @param pageFunction - Function to be evaluated in the page context. - * @param args - Arguments to pass to `pageFunction`. - * @returns Promise which resolves to the return value of `pageFunction`. - */ - evaluateHandle( - pageFunction: EvaluateHandleFn, - ...args: SerializableOrJSHandle[] - ): Promise; -} diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/WebWorker.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/WebWorker.js deleted file mode 100644 index 4807f108785..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/WebWorker.js +++ /dev/null @@ -1,134 +0,0 @@ -/// -/** - * Copyright 2018 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { EventEmitter } from "./EventEmitter.js"; -import { debugError } from "./helper.js"; -import { ExecutionContext } from "./ExecutionContext.js"; -import { JSHandle } from "./JSHandle.js"; -/** - * The WebWorker class represents a - * {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorker}. - * - * @remarks - * The events `workercreated` and `workerdestroyed` are emitted on the page - * object to signal the worker lifecycle. - * - * @example - * ```js - * page.on('workercreated', worker => console.log('Worker created: ' + worker.url())); - * page.on('workerdestroyed', worker => console.log('Worker destroyed: ' + worker.url())); - * - * console.log('Current workers:'); - * for (const worker of page.workers()) { - * console.log(' ' + worker.url()); - * } - * ``` - * - * @public - */ -export class WebWorker extends EventEmitter { - /** - * - * @internal - */ - constructor(client, url, consoleAPICalled, exceptionThrown) { - super(); - this._client = client; - this._url = url; - this._executionContextPromise = new Promise(( - x, - ) => (this._executionContextCallback = x)); - let jsHandleFactory; - this._client.once("Runtime.executionContextCreated", async (event) => { - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type - jsHandleFactory = (remoteObject) => - new JSHandle(executionContext, client, remoteObject); - const executionContext = new ExecutionContext( - client, - event.context, - null, - ); - this._executionContextCallback(executionContext); - }); - // This might fail if the target is closed before we recieve all execution contexts. - this._client.send("Runtime.enable").catch(debugError); - this._client.on( - "Runtime.consoleAPICalled", - (event) => - consoleAPICalled( - event.type, - event.args.map(jsHandleFactory), - event.stackTrace, - ), - ); - this._client.on( - "Runtime.exceptionThrown", - (exception) => exceptionThrown(exception.exceptionDetails), - ); - } - /** - * @returns The URL of this web worker. - */ - url() { - return this._url; - } - /** - * Returns the ExecutionContext the WebWorker runs in - * @returns The ExecutionContext the web worker runs in. - */ - async executionContext() { - return this._executionContextPromise; - } - /** - * If the function passed to the `worker.evaluate` returns a Promise, then - * `worker.evaluate` would wait for the promise to resolve and return its - * value. If the function passed to the `worker.evaluate` returns a - * non-serializable value, then `worker.evaluate` resolves to `undefined`. - * DevTools Protocol also supports transferring some additional values that - * are not serializable by `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`, and - * bigint literals. - * Shortcut for `await worker.executionContext()).evaluate(pageFunction, ...args)`. - * - * @param pageFunction - Function to be evaluated in the worker context. - * @param args - Arguments to pass to `pageFunction`. - * @returns Promise which resolves to the return value of `pageFunction`. - */ - async evaluate(pageFunction, ...args) { - return (await this._executionContextPromise).evaluate( - pageFunction, - ...args, - ); - } - /** - * The only difference between `worker.evaluate` and `worker.evaluateHandle` - * is that `worker.evaluateHandle` returns in-page object (JSHandle). If the - * function passed to the `worker.evaluateHandle` returns a [Promise], then - * `worker.evaluateHandle` would wait for the promise to resolve and return - * its value. Shortcut for - * `await worker.executionContext()).evaluateHandle(pageFunction, ...args)` - * - * @param pageFunction - Function to be evaluated in the page context. - * @param args - Arguments to pass to `pageFunction`. - * @returns Promise which resolves to the return value of `pageFunction`. - */ - async evaluateHandle(pageFunction, ...args) { - return (await this._executionContextPromise).evaluateHandle( - pageFunction, - ...args, - ); - } -} -//# sourceMappingURL=WebWorker.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/assert.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/assert.d.ts deleted file mode 100644 index de509101e2d..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/assert.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Asserts that the given value is truthy. - * @param value - * @param message - the error message to throw if the value is not truthy. - */ -export declare const assert: (value: unknown, message?: string) => void; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/assert.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/assert.js deleted file mode 100644 index 456fd945646..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/assert.js +++ /dev/null @@ -1,27 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Asserts that the given value is truthy. - * @param value - * @param message - the error message to throw if the value is not truthy. - */ -export const assert = (value, message) => { - if (!value) { - throw new Error(message); - } -}; -//# sourceMappingURL=assert.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/fetch.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/fetch.d.ts deleted file mode 100644 index 0982c1b169f..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/fetch.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export declare const getFetch: () => Promise; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/fetch.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/fetch.js deleted file mode 100644 index 99b20d3449e..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/fetch.js +++ /dev/null @@ -1,21 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* Use the global version. */ -export const getFetch = async () => { - return globalThis.fetch; -}; -//# sourceMappingURL=fetch.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/helper.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/helper.d.ts deleted file mode 100644 index 748e6ae42b3..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/helper.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { CDPSession } from "./Connection.js"; -import { Protocol } from "../../vendor/devtools-protocol/types/protocol.d.ts"; -import { CommonEventEmitter } from "./EventEmitter.js"; -export declare const debugError: (...args: unknown[]) => void; -declare function getExceptionMessage( - exceptionDetails: Protocol.Runtime.ExceptionDetails, -): string; -declare function valueFromRemoteObject( - remoteObject: Protocol.Runtime.RemoteObject, -): any; -declare function releaseObject( - client: CDPSession, - remoteObject: Protocol.Runtime.RemoteObject, -): Promise; -/** - * @public - */ -export interface PuppeteerEventListener { - emitter: CommonEventEmitter; - eventName: string | symbol; - handler: (...args: any[]) => void; -} -declare function addEventListener( - emitter: CommonEventEmitter, - eventName: string | symbol, - handler: (...args: any[]) => void, -): PuppeteerEventListener; -declare function removeEventListeners( - listeners: Array<{ - emitter: CommonEventEmitter; - eventName: string | symbol; - handler: (...args: any[]) => void; - }>, -): void; -declare function isString(obj: unknown): obj is string; -declare function isNumber(obj: unknown): obj is number; -declare function waitForEvent( - emitter: CommonEventEmitter, - eventName: string | symbol, - predicate: (event: T) => Promise | boolean, - timeout: number, - abortPromise: Promise, -): Promise; -declare function evaluationString( - fun: Function | string, - ...args: unknown[] -): string; -declare function pageBindingInitString(type: string, name: string): string; -declare function pageBindingDeliverResultString( - name: string, - seq: number, - result: unknown, -): string; -declare function pageBindingDeliverErrorString( - name: string, - seq: number, - message: string, - stack: string, -): string; -declare function pageBindingDeliverErrorValueString( - name: string, - seq: number, - value: unknown, -): string; -declare function makePredicateString( - predicate: Function, - predicateQueryHandler?: Function, -): string; -declare function waitWithTimeout( - promise: Promise, - taskName: string, - timeout: number, -): Promise; -declare function readProtocolStream( - client: CDPSession, - handle: string, - path?: string, -): Promise; -export declare const helper: { - evaluationString: typeof evaluationString; - pageBindingInitString: typeof pageBindingInitString; - pageBindingDeliverResultString: typeof pageBindingDeliverResultString; - pageBindingDeliverErrorString: typeof pageBindingDeliverErrorString; - pageBindingDeliverErrorValueString: typeof pageBindingDeliverErrorValueString; - makePredicateString: typeof makePredicateString; - readProtocolStream: typeof readProtocolStream; - waitWithTimeout: typeof waitWithTimeout; - waitForEvent: typeof waitForEvent; - isString: typeof isString; - isNumber: typeof isNumber; - addEventListener: typeof addEventListener; - removeEventListeners: typeof removeEventListeners; - valueFromRemoteObject: typeof valueFromRemoteObject; - getExceptionMessage: typeof getExceptionMessage; - releaseObject: typeof releaseObject; -}; -export {}; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/helper.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/helper.js deleted file mode 100644 index dbf63c64d6f..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/common/helper.js +++ /dev/null @@ -1,292 +0,0 @@ -/// -/** - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { TimeoutError } from "./Errors.js"; -import { debug } from "./Debug.js"; -import { assert } from "./assert.js"; -import { base64Decode, concatUint8Array } from "../../vendor/std.ts"; -export const debugError = debug("puppeteer:error"); -function getExceptionMessage(exceptionDetails) { - if (exceptionDetails.exception) { - return (exceptionDetails.exception.description || - exceptionDetails.exception.value); - } - let message = exceptionDetails.text; - if (exceptionDetails.stackTrace) { - for (const callframe of exceptionDetails.stackTrace.callFrames) { - const location = callframe.url + - ":" + - callframe.lineNumber + - ":" + - callframe.columnNumber; - const functionName = callframe.functionName || ""; - message += `\n at ${functionName} (${location})`; - } - } - return message; -} -function valueFromRemoteObject(remoteObject) { - assert(!remoteObject.objectId, "Cannot extract value when objectId is given"); - if (remoteObject.unserializableValue) { - if (remoteObject.type === "bigint" && typeof BigInt !== "undefined") { - return BigInt(remoteObject.unserializableValue.replace("n", "")); - } - switch (remoteObject.unserializableValue) { - case "-0": - return -0; - case "NaN": - return NaN; - case "Infinity": - return Infinity; - case "-Infinity": - return -Infinity; - default: - throw new Error( - "Unsupported unserializable value: " + - remoteObject.unserializableValue, - ); - } - } - return remoteObject.value; -} -async function releaseObject(client, remoteObject) { - if (!remoteObject.objectId) { - return; - } - await client - .send("Runtime.releaseObject", { objectId: remoteObject.objectId }) - .catch((error) => { - // Exceptions might happen in case of a page been navigated or closed. - // Swallow these since they are harmless and we don't leak anything in this case. - debugError(error); - }); -} -function addEventListener(emitter, eventName, handler) { - emitter.on(eventName, handler); - return { emitter, eventName, handler }; -} -function removeEventListeners(listeners) { - for (const listener of listeners) { - listener.emitter.removeListener(listener.eventName, listener.handler); - } - listeners.length = 0; -} -function isString(obj) { - return typeof obj === "string" || obj instanceof String; -} -function isNumber(obj) { - return typeof obj === "number" || obj instanceof Number; -} -async function waitForEvent( - emitter, - eventName, - predicate, - timeout, - abortPromise, -) { - let eventTimeout, resolveCallback, rejectCallback; - const promise = new Promise((resolve, reject) => { - resolveCallback = resolve; - rejectCallback = reject; - }); - const listener = addEventListener(emitter, eventName, async (event) => { - if (!(await predicate(event))) { - return; - } - resolveCallback(event); - }); - if (timeout) { - eventTimeout = setTimeout(() => { - rejectCallback( - new TimeoutError("Timeout exceeded while waiting for event"), - ); - }, timeout); - } - function cleanup() { - removeEventListeners([listener]); - clearTimeout(eventTimeout); - } - const result = await Promise.race([promise, abortPromise]).then((r) => { - cleanup(); - return r; - }, (error) => { - cleanup(); - throw error; - }); - if (result instanceof Error) { - throw result; - } - return result; -} -function evaluationString(fun, ...args) { - if (isString(fun)) { - assert(args.length === 0, "Cannot evaluate a string with arguments"); - return fun; - } - function serializeArgument(arg) { - if (Object.is(arg, undefined)) { - return "undefined"; - } - return JSON.stringify(arg); - } - return `(${fun})(${args.map(serializeArgument).join(",")})`; -} -function pageBindingInitString(type, name) { - function addPageBinding(type, bindingName) { - /* Cast window to any here as we're about to add properties to it - * via win[bindingName] which TypeScript doesn't like. - */ - const win = window; - const binding = win[bindingName]; - win[bindingName] = (...args) => { - const me = window[bindingName]; - let callbacks = me.callbacks; - if (!callbacks) { - callbacks = new Map(); - me.callbacks = callbacks; - } - const seq = (me.lastSeq || 0) + 1; - me.lastSeq = seq; - const promise = new Promise((resolve, reject) => - callbacks.set(seq, { resolve, reject }) - ); - binding(JSON.stringify({ type, name: bindingName, seq, args })); - return promise; - }; - } - return evaluationString(addPageBinding, type, name); -} -function pageBindingDeliverResultString(name, seq, result) { - function deliverResult(name, seq, result) { - window[name].callbacks.get(seq).resolve(result); - window[name].callbacks.delete(seq); - } - return evaluationString(deliverResult, name, seq, result); -} -function pageBindingDeliverErrorString(name, seq, message, stack) { - function deliverError(name, seq, message, stack) { - const error = new Error(message); - error.stack = stack; - window[name].callbacks.get(seq).reject(error); - window[name].callbacks.delete(seq); - } - return evaluationString(deliverError, name, seq, message, stack); -} -function pageBindingDeliverErrorValueString(name, seq, value) { - function deliverErrorValue(name, seq, value) { - window[name].callbacks.get(seq).reject(value); - window[name].callbacks.delete(seq); - } - return evaluationString(deliverErrorValue, name, seq, value); -} -function makePredicateString(predicate, predicateQueryHandler) { - function checkWaitForOptions(node, waitForVisible, waitForHidden) { - if (!node) { - return waitForHidden; - } - if (!waitForVisible && !waitForHidden) { - return node; - } - const element = node.nodeType === Node.TEXT_NODE - ? node.parentElement - : node; - const style = window.getComputedStyle(element); - const isVisible = style && style.visibility !== "hidden" && - hasVisibleBoundingBox(); - const success = waitForVisible === isVisible || - waitForHidden === !isVisible; - return success ? node : null; - function hasVisibleBoundingBox() { - const rect = element.getBoundingClientRect(); - return !!(rect.top || rect.bottom || rect.width || rect.height); - } - } - const predicateQueryHandlerDef = predicateQueryHandler - ? `const predicateQueryHandler = ${predicateQueryHandler};` - : ""; - return ` - (() => { - ${predicateQueryHandlerDef} - const checkWaitForOptions = ${checkWaitForOptions}; - return (${predicate})(...args) - })() `; -} -async function waitWithTimeout(promise, taskName, timeout) { - let reject; - const timeoutError = new TimeoutError( - `waiting for ${taskName} failed: timeout ${timeout}ms exceeded`, - ); - const timeoutPromise = new Promise((resolve, x) => (reject = x)); - let timeoutTimer = null; - if (timeout) { - timeoutTimer = setTimeout(() => reject(timeoutError), timeout); - } - try { - return await Promise.race([promise, timeoutPromise]); - } finally { - if (timeoutTimer) { - clearTimeout(timeoutTimer); - } - } -} -async function readProtocolStream(client, handle, path) { - let eof = false; - let fileHandle; - if (path) { - fileHandle = await Deno.open(path, { create: true, write: true }); - } - const arrs = []; - while (!eof) { - const response = await client.send("IO.read", { handle }); - eof = response.eof; - const arr = response.base64Encoded - ? base64Decode(response.data) - : new TextEncoder().encode(response.data); - arrs.push(arr); - if (path) { - await Deno.writeAll(fileHandle, arr); - } - } - if (fileHandle) { - fileHandle.close(); - } - await client.send("IO.close", { handle }); - let resultArr = null; - try { - resultArr = concatUint8Array(...arrs); - } finally { - return resultArr; - } -} -export const helper = { - evaluationString, - pageBindingInitString, - pageBindingDeliverResultString, - pageBindingDeliverErrorString, - pageBindingDeliverErrorValueString, - makePredicateString, - readProtocolStream, - waitWithTimeout, - waitForEvent, - isString, - isNumber, - addEventListener, - removeEventListeners, - valueFromRemoteObject, - getExceptionMessage, - releaseObject, -}; -//# sourceMappingURL=helper.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/revisions.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/revisions.d.ts deleted file mode 100644 index 7f9d2748325..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/revisions.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -declare type Revisions = Readonly<{ - readonly chromium: string; - readonly firefox: string; -}>; -export declare const PUPPETEER_REVISIONS: Revisions; -export {}; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/revisions.js b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/revisions.js deleted file mode 100644 index f9fe313892c..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/puppeteer/revisions.js +++ /dev/null @@ -1,21 +0,0 @@ -/// -/** - * Copyright 2020 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export const PUPPETEER_REVISIONS = { - chromium: "869685", - firefox: "latest", -}; -//# sourceMappingURL=revisions.js.map diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/vendor/cache.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/vendor/cache.ts deleted file mode 100644 index 1d9dd58d685..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/vendor/cache.ts +++ /dev/null @@ -1 +0,0 @@ -export { cachedir } from "https://deno.land/x/cache@0.2.12/directories.ts"; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/vendor/devtools-protocol/types/protocol-mapping.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/vendor/devtools-protocol/types/protocol-mapping.d.ts deleted file mode 100644 index 721e7ef0539..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/vendor/devtools-protocol/types/protocol-mapping.d.ts +++ /dev/null @@ -1,4236 +0,0 @@ -/********************************************************************** - * Auto-generated by protocol-dts-generator.ts, do not edit manually. * - **********************************************************************/ - -import Protocol from "./protocol.d.ts"; - -/** - * Mappings from protocol event and command names to the types required for them. - */ -export namespace ProtocolMapping { - export interface Events { - /** - * Issued when new console message is added. - */ - "Console.messageAdded": [Protocol.Console.MessageAddedEvent]; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - "Debugger.breakpointResolved": [Protocol.Debugger.BreakpointResolvedEvent]; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - "Debugger.paused": [Protocol.Debugger.PausedEvent]; - /** - * Fired when the virtual machine resumed execution. - */ - "Debugger.resumed": []; - /** - * Fired when virtual machine fails to parse the script. - */ - "Debugger.scriptFailedToParse": [ - Protocol.Debugger.ScriptFailedToParseEvent, - ]; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected - * scripts upon enabling debugger. - */ - "Debugger.scriptParsed": [Protocol.Debugger.ScriptParsedEvent]; - "HeapProfiler.addHeapSnapshotChunk": [ - Protocol.HeapProfiler.AddHeapSnapshotChunkEvent, - ]; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - "HeapProfiler.heapStatsUpdate": [ - Protocol.HeapProfiler.HeapStatsUpdateEvent, - ]; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last - * seen object id and corresponding timestamp. If the were changes in the heap since last event - * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - "HeapProfiler.lastSeenObjectId": [ - Protocol.HeapProfiler.LastSeenObjectIdEvent, - ]; - "HeapProfiler.reportHeapSnapshotProgress": [ - Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent, - ]; - "HeapProfiler.resetProfiles": []; - "Profiler.consoleProfileFinished": [ - Protocol.Profiler.ConsoleProfileFinishedEvent, - ]; - /** - * Sent when new profile recording is started using console.profile() call. - */ - "Profiler.consoleProfileStarted": [ - Protocol.Profiler.ConsoleProfileStartedEvent, - ]; - /** - * Reports coverage delta since the last poll (either from an event like this, or from - * `takePreciseCoverage` for the current isolate. May only be sent if precise code - * coverage has been started. This event can be trigged by the embedder to, for example, - * trigger collection of coverage data immediatelly at a certain point in time. - */ - "Profiler.preciseCoverageDeltaUpdate": [ - Protocol.Profiler.PreciseCoverageDeltaUpdateEvent, - ]; - /** - * Notification is issued every time when binding is called. - */ - "Runtime.bindingCalled": [Protocol.Runtime.BindingCalledEvent]; - /** - * Issued when console API was called. - */ - "Runtime.consoleAPICalled": [Protocol.Runtime.ConsoleAPICalledEvent]; - /** - * Issued when unhandled exception was revoked. - */ - "Runtime.exceptionRevoked": [Protocol.Runtime.ExceptionRevokedEvent]; - /** - * Issued when exception was thrown and unhandled. - */ - "Runtime.exceptionThrown": [Protocol.Runtime.ExceptionThrownEvent]; - /** - * Issued when new execution context is created. - */ - "Runtime.executionContextCreated": [ - Protocol.Runtime.ExecutionContextCreatedEvent, - ]; - /** - * Issued when execution context is destroyed. - */ - "Runtime.executionContextDestroyed": [ - Protocol.Runtime.ExecutionContextDestroyedEvent, - ]; - /** - * Issued when all executionContexts were cleared in browser - */ - "Runtime.executionContextsCleared": []; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API - * call). - */ - "Runtime.inspectRequested": [Protocol.Runtime.InspectRequestedEvent]; - /** - * Event for when an animation has been cancelled. - */ - "Animation.animationCanceled": [Protocol.Animation.AnimationCanceledEvent]; - /** - * Event for each animation that has been created. - */ - "Animation.animationCreated": [Protocol.Animation.AnimationCreatedEvent]; - /** - * Event for animation that has been started. - */ - "Animation.animationStarted": [Protocol.Animation.AnimationStartedEvent]; - "ApplicationCache.applicationCacheStatusUpdated": [ - Protocol.ApplicationCache.ApplicationCacheStatusUpdatedEvent, - ]; - "ApplicationCache.networkStateUpdated": [ - Protocol.ApplicationCache.NetworkStateUpdatedEvent, - ]; - "Audits.issueAdded": [Protocol.Audits.IssueAddedEvent]; - /** - * Called when the recording state for the service has been updated. - */ - "BackgroundService.recordingStateChanged": [ - Protocol.BackgroundService.RecordingStateChangedEvent, - ]; - /** - * Called with all existing backgroundServiceEvents when enabled, and all new - * events afterwards if enabled and recording. - */ - "BackgroundService.backgroundServiceEventReceived": [ - Protocol.BackgroundService.BackgroundServiceEventReceivedEvent, - ]; - /** - * Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded - * web font - */ - "CSS.fontsUpdated": [Protocol.CSS.FontsUpdatedEvent]; - /** - * Fires whenever a MediaQuery result changes (for example, after a browser window has been - * resized.) The current implementation considers only viewport-dependent media features. - */ - "CSS.mediaQueryResultChanged": []; - /** - * Fired whenever an active document stylesheet is added. - */ - "CSS.styleSheetAdded": [Protocol.CSS.StyleSheetAddedEvent]; - /** - * Fired whenever a stylesheet is changed as a result of the client operation. - */ - "CSS.styleSheetChanged": [Protocol.CSS.StyleSheetChangedEvent]; - /** - * Fired whenever an active document stylesheet is removed. - */ - "CSS.styleSheetRemoved": [Protocol.CSS.StyleSheetRemovedEvent]; - /** - * This is fired whenever the list of available sinks changes. A sink is a - * device or a software surface that you can cast to. - */ - "Cast.sinksUpdated": [Protocol.Cast.SinksUpdatedEvent]; - /** - * This is fired whenever the outstanding issue/error message changes. - * |issueMessage| is empty if there is no issue. - */ - "Cast.issueUpdated": [Protocol.Cast.IssueUpdatedEvent]; - /** - * Fired when `Element`'s attribute is modified. - */ - "DOM.attributeModified": [Protocol.DOM.AttributeModifiedEvent]; - /** - * Fired when `Element`'s attribute is removed. - */ - "DOM.attributeRemoved": [Protocol.DOM.AttributeRemovedEvent]; - /** - * Mirrors `DOMCharacterDataModified` event. - */ - "DOM.characterDataModified": [Protocol.DOM.CharacterDataModifiedEvent]; - /** - * Fired when `Container`'s child node count has changed. - */ - "DOM.childNodeCountUpdated": [Protocol.DOM.ChildNodeCountUpdatedEvent]; - /** - * Mirrors `DOMNodeInserted` event. - */ - "DOM.childNodeInserted": [Protocol.DOM.ChildNodeInsertedEvent]; - /** - * Mirrors `DOMNodeRemoved` event. - */ - "DOM.childNodeRemoved": [Protocol.DOM.ChildNodeRemovedEvent]; - /** - * Called when distrubution is changed. - */ - "DOM.distributedNodesUpdated": [Protocol.DOM.DistributedNodesUpdatedEvent]; - /** - * Fired when `Document` has been totally updated. Node ids are no longer valid. - */ - "DOM.documentUpdated": []; - /** - * Fired when `Element`'s inline style is modified via a CSS property modification. - */ - "DOM.inlineStyleInvalidated": [Protocol.DOM.InlineStyleInvalidatedEvent]; - /** - * Called when a pseudo element is added to an element. - */ - "DOM.pseudoElementAdded": [Protocol.DOM.PseudoElementAddedEvent]; - /** - * Called when a pseudo element is removed from an element. - */ - "DOM.pseudoElementRemoved": [Protocol.DOM.PseudoElementRemovedEvent]; - /** - * Fired when backend wants to provide client with the missing DOM structure. This happens upon - * most of the calls requesting node ids. - */ - "DOM.setChildNodes": [Protocol.DOM.SetChildNodesEvent]; - /** - * Called when shadow root is popped from the element. - */ - "DOM.shadowRootPopped": [Protocol.DOM.ShadowRootPoppedEvent]; - /** - * Called when shadow root is pushed into the element. - */ - "DOM.shadowRootPushed": [Protocol.DOM.ShadowRootPushedEvent]; - "DOMStorage.domStorageItemAdded": [ - Protocol.DOMStorage.DomStorageItemAddedEvent, - ]; - "DOMStorage.domStorageItemRemoved": [ - Protocol.DOMStorage.DomStorageItemRemovedEvent, - ]; - "DOMStorage.domStorageItemUpdated": [ - Protocol.DOMStorage.DomStorageItemUpdatedEvent, - ]; - "DOMStorage.domStorageItemsCleared": [ - Protocol.DOMStorage.DomStorageItemsClearedEvent, - ]; - "Database.addDatabase": [Protocol.Database.AddDatabaseEvent]; - /** - * Notification sent after the virtual time budget for the current VirtualTimePolicy has run out. - */ - "Emulation.virtualTimeBudgetExpired": []; - /** - * Issued when the target starts or stops needing BeginFrames. - * Deprecated. Issue beginFrame unconditionally instead and use result from - * beginFrame to detect whether the frames were suppressed. - */ - "HeadlessExperimental.needsBeginFramesChanged": [ - Protocol.HeadlessExperimental.NeedsBeginFramesChangedEvent, - ]; - /** - * Fired when remote debugging connection is about to be terminated. Contains detach reason. - */ - "Inspector.detached": [Protocol.Inspector.DetachedEvent]; - /** - * Fired when debugging target has crashed - */ - "Inspector.targetCrashed": []; - /** - * Fired when debugging target has reloaded after crash - */ - "Inspector.targetReloadedAfterCrash": []; - "LayerTree.layerPainted": [Protocol.LayerTree.LayerPaintedEvent]; - "LayerTree.layerTreeDidChange": [ - Protocol.LayerTree.LayerTreeDidChangeEvent, - ]; - /** - * Issued when new message was logged. - */ - "Log.entryAdded": [Protocol.Log.EntryAddedEvent]; - /** - * Fired when data chunk was received over the network. - */ - "Network.dataReceived": [Protocol.Network.DataReceivedEvent]; - /** - * Fired when EventSource message is received. - */ - "Network.eventSourceMessageReceived": [ - Protocol.Network.EventSourceMessageReceivedEvent, - ]; - /** - * Fired when HTTP request has failed to load. - */ - "Network.loadingFailed": [Protocol.Network.LoadingFailedEvent]; - /** - * Fired when HTTP request has finished loading. - */ - "Network.loadingFinished": [Protocol.Network.LoadingFinishedEvent]; - /** - * Details of an intercepted HTTP request, which must be either allowed, blocked, modified or - * mocked. - * Deprecated, use Fetch.requestPaused instead. - */ - "Network.requestIntercepted": [Protocol.Network.RequestInterceptedEvent]; - /** - * Fired if request ended up loading from cache. - */ - "Network.requestServedFromCache": [ - Protocol.Network.RequestServedFromCacheEvent, - ]; - /** - * Fired when page is about to send HTTP request. - */ - "Network.requestWillBeSent": [Protocol.Network.RequestWillBeSentEvent]; - /** - * Fired when resource loading priority is changed - */ - "Network.resourceChangedPriority": [ - Protocol.Network.ResourceChangedPriorityEvent, - ]; - /** - * Fired when a signed exchange was received over the network - */ - "Network.signedExchangeReceived": [ - Protocol.Network.SignedExchangeReceivedEvent, - ]; - /** - * Fired when HTTP response is available. - */ - "Network.responseReceived": [Protocol.Network.ResponseReceivedEvent]; - /** - * Fired when WebSocket is closed. - */ - "Network.webSocketClosed": [Protocol.Network.WebSocketClosedEvent]; - /** - * Fired upon WebSocket creation. - */ - "Network.webSocketCreated": [Protocol.Network.WebSocketCreatedEvent]; - /** - * Fired when WebSocket message error occurs. - */ - "Network.webSocketFrameError": [Protocol.Network.WebSocketFrameErrorEvent]; - /** - * Fired when WebSocket message is received. - */ - "Network.webSocketFrameReceived": [ - Protocol.Network.WebSocketFrameReceivedEvent, - ]; - /** - * Fired when WebSocket message is sent. - */ - "Network.webSocketFrameSent": [Protocol.Network.WebSocketFrameSentEvent]; - /** - * Fired when WebSocket handshake response becomes available. - */ - "Network.webSocketHandshakeResponseReceived": [ - Protocol.Network.WebSocketHandshakeResponseReceivedEvent, - ]; - /** - * Fired when WebSocket is about to initiate handshake. - */ - "Network.webSocketWillSendHandshakeRequest": [ - Protocol.Network.WebSocketWillSendHandshakeRequestEvent, - ]; - /** - * Fired when additional information about a requestWillBeSent event is available from the - * network stack. Not every requestWillBeSent event will have an additional - * requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent - * or requestWillBeSentExtraInfo will be fired first for the same request. - */ - "Network.requestWillBeSentExtraInfo": [ - Protocol.Network.RequestWillBeSentExtraInfoEvent, - ]; - /** - * Fired when additional information about a responseReceived event is available from the network - * stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for - * it, and responseReceivedExtraInfo may be fired before or after responseReceived. - */ - "Network.responseReceivedExtraInfo": [ - Protocol.Network.ResponseReceivedExtraInfoEvent, - ]; - /** - * Fired when the node should be inspected. This happens after call to `setInspectMode` or when - * user manually inspects an element. - */ - "Overlay.inspectNodeRequested": [ - Protocol.Overlay.InspectNodeRequestedEvent, - ]; - /** - * Fired when the node should be highlighted. This happens after call to `setInspectMode`. - */ - "Overlay.nodeHighlightRequested": [ - Protocol.Overlay.NodeHighlightRequestedEvent, - ]; - /** - * Fired when user asks to capture screenshot of some area on the page. - */ - "Overlay.screenshotRequested": [Protocol.Overlay.ScreenshotRequestedEvent]; - /** - * Fired when user cancels the inspect mode. - */ - "Overlay.inspectModeCanceled": []; - "Page.domContentEventFired": [Protocol.Page.DomContentEventFiredEvent]; - /** - * Emitted only when `page.interceptFileChooser` is enabled. - */ - "Page.fileChooserOpened": [Protocol.Page.FileChooserOpenedEvent]; - /** - * Fired when frame has been attached to its parent. - */ - "Page.frameAttached": [Protocol.Page.FrameAttachedEvent]; - /** - * Fired when frame no longer has a scheduled navigation. - */ - "Page.frameClearedScheduledNavigation": [ - Protocol.Page.FrameClearedScheduledNavigationEvent, - ]; - /** - * Fired when frame has been detached from its parent. - */ - "Page.frameDetached": [Protocol.Page.FrameDetachedEvent]; - /** - * Fired once navigation of the frame has completed. Frame is now associated with the new loader. - */ - "Page.frameNavigated": [Protocol.Page.FrameNavigatedEvent]; - "Page.frameResized": []; - /** - * Fired when a renderer-initiated navigation is requested. - * Navigation may still be cancelled after the event is issued. - */ - "Page.frameRequestedNavigation": [ - Protocol.Page.FrameRequestedNavigationEvent, - ]; - /** - * Fired when frame schedules a potential navigation. - */ - "Page.frameScheduledNavigation": [ - Protocol.Page.FrameScheduledNavigationEvent, - ]; - /** - * Fired when frame has started loading. - */ - "Page.frameStartedLoading": [Protocol.Page.FrameStartedLoadingEvent]; - /** - * Fired when frame has stopped loading. - */ - "Page.frameStoppedLoading": [Protocol.Page.FrameStoppedLoadingEvent]; - /** - * Fired when page is about to start a download. - */ - "Page.downloadWillBegin": [Protocol.Page.DownloadWillBeginEvent]; - /** - * Fired when download makes progress. Last call has |done| == true. - */ - "Page.downloadProgress": [Protocol.Page.DownloadProgressEvent]; - /** - * Fired when interstitial page was hidden - */ - "Page.interstitialHidden": []; - /** - * Fired when interstitial page was shown - */ - "Page.interstitialShown": []; - /** - * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been - * closed. - */ - "Page.javascriptDialogClosed": [Protocol.Page.JavascriptDialogClosedEvent]; - /** - * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to - * open. - */ - "Page.javascriptDialogOpening": [ - Protocol.Page.JavascriptDialogOpeningEvent, - ]; - /** - * Fired for top level page lifecycle events such as navigation, load, paint, etc. - */ - "Page.lifecycleEvent": [Protocol.Page.LifecycleEventEvent]; - "Page.loadEventFired": [Protocol.Page.LoadEventFiredEvent]; - /** - * Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation. - */ - "Page.navigatedWithinDocument": [ - Protocol.Page.NavigatedWithinDocumentEvent, - ]; - /** - * Compressed image data requested by the `startScreencast`. - */ - "Page.screencastFrame": [Protocol.Page.ScreencastFrameEvent]; - /** - * Fired when the page with currently enabled screencast was shown or hidden `. - */ - "Page.screencastVisibilityChanged": [ - Protocol.Page.ScreencastVisibilityChangedEvent, - ]; - /** - * Fired when a new window is going to be opened, via window.open(), link click, form submission, - * etc. - */ - "Page.windowOpen": [Protocol.Page.WindowOpenEvent]; - /** - * Issued for every compilation cache generated. Is only available - * if Page.setGenerateCompilationCache is enabled. - */ - "Page.compilationCacheProduced": [ - Protocol.Page.CompilationCacheProducedEvent, - ]; - /** - * Current values of the metrics. - */ - "Performance.metrics": [Protocol.Performance.MetricsEvent]; - /** - * There is a certificate error. If overriding certificate errors is enabled, then it should be - * handled with the `handleCertificateError` command. Note: this event does not fire if the - * certificate error has been allowed internally. Only one client per target should override - * certificate errors at the same time. - */ - "Security.certificateError": [Protocol.Security.CertificateErrorEvent]; - /** - * The security state of the page changed. - */ - "Security.visibleSecurityStateChanged": [ - Protocol.Security.VisibleSecurityStateChangedEvent, - ]; - /** - * The security state of the page changed. - */ - "Security.securityStateChanged": [ - Protocol.Security.SecurityStateChangedEvent, - ]; - "ServiceWorker.workerErrorReported": [ - Protocol.ServiceWorker.WorkerErrorReportedEvent, - ]; - "ServiceWorker.workerRegistrationUpdated": [ - Protocol.ServiceWorker.WorkerRegistrationUpdatedEvent, - ]; - "ServiceWorker.workerVersionUpdated": [ - Protocol.ServiceWorker.WorkerVersionUpdatedEvent, - ]; - /** - * A cache's contents have been modified. - */ - "Storage.cacheStorageContentUpdated": [ - Protocol.Storage.CacheStorageContentUpdatedEvent, - ]; - /** - * A cache has been added/deleted. - */ - "Storage.cacheStorageListUpdated": [ - Protocol.Storage.CacheStorageListUpdatedEvent, - ]; - /** - * The origin's IndexedDB object store has been modified. - */ - "Storage.indexedDBContentUpdated": [ - Protocol.Storage.IndexedDBContentUpdatedEvent, - ]; - /** - * The origin's IndexedDB database list has been modified. - */ - "Storage.indexedDBListUpdated": [ - Protocol.Storage.IndexedDBListUpdatedEvent, - ]; - /** - * Issued when attached to target because of auto-attach or `attachToTarget` command. - */ - "Target.attachedToTarget": [Protocol.Target.AttachedToTargetEvent]; - /** - * Issued when detached from target for any reason (including `detachFromTarget` command). Can be - * issued multiple times per target if multiple sessions have been attached to it. - */ - "Target.detachedFromTarget": [Protocol.Target.DetachedFromTargetEvent]; - /** - * Notifies about a new protocol message received from the session (as reported in - * `attachedToTarget` event). - */ - "Target.receivedMessageFromTarget": [ - Protocol.Target.ReceivedMessageFromTargetEvent, - ]; - /** - * Issued when a possible inspection target is created. - */ - "Target.targetCreated": [Protocol.Target.TargetCreatedEvent]; - /** - * Issued when a target is destroyed. - */ - "Target.targetDestroyed": [Protocol.Target.TargetDestroyedEvent]; - /** - * Issued when a target has crashed. - */ - "Target.targetCrashed": [Protocol.Target.TargetCrashedEvent]; - /** - * Issued when some information about a target has changed. This only happens between - * `targetCreated` and `targetDestroyed`. - */ - "Target.targetInfoChanged": [Protocol.Target.TargetInfoChangedEvent]; - /** - * Informs that port was successfully bound and got a specified connection id. - */ - "Tethering.accepted": [Protocol.Tethering.AcceptedEvent]; - "Tracing.bufferUsage": [Protocol.Tracing.BufferUsageEvent]; - /** - * Contains an bucket of collected trace events. When tracing is stopped collected events will be - * send as a sequence of dataCollected events followed by tracingComplete event. - */ - "Tracing.dataCollected": [Protocol.Tracing.DataCollectedEvent]; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - "Tracing.tracingComplete": [Protocol.Tracing.TracingCompleteEvent]; - /** - * Issued when the domain is enabled and the request URL matches the - * specified filter. The request is paused until the client responds - * with one of continueRequest, failRequest or fulfillRequest. - * The stage of the request can be determined by presence of responseErrorReason - * and responseStatusCode -- the request is at the response stage if either - * of these fields is present and in the request stage otherwise. - */ - "Fetch.requestPaused": [Protocol.Fetch.RequestPausedEvent]; - /** - * Issued when the domain is enabled with handleAuthRequests set to true. - * The request is paused until client responds with continueWithAuth. - */ - "Fetch.authRequired": [Protocol.Fetch.AuthRequiredEvent]; - /** - * Notifies that a new BaseAudioContext has been created. - */ - "WebAudio.contextCreated": [Protocol.WebAudio.ContextCreatedEvent]; - /** - * Notifies that an existing BaseAudioContext will be destroyed. - */ - "WebAudio.contextWillBeDestroyed": [ - Protocol.WebAudio.ContextWillBeDestroyedEvent, - ]; - /** - * Notifies that existing BaseAudioContext has changed some properties (id stays the same).. - */ - "WebAudio.contextChanged": [Protocol.WebAudio.ContextChangedEvent]; - /** - * Notifies that the construction of an AudioListener has finished. - */ - "WebAudio.audioListenerCreated": [ - Protocol.WebAudio.AudioListenerCreatedEvent, - ]; - /** - * Notifies that a new AudioListener has been created. - */ - "WebAudio.audioListenerWillBeDestroyed": [ - Protocol.WebAudio.AudioListenerWillBeDestroyedEvent, - ]; - /** - * Notifies that a new AudioNode has been created. - */ - "WebAudio.audioNodeCreated": [Protocol.WebAudio.AudioNodeCreatedEvent]; - /** - * Notifies that an existing AudioNode has been destroyed. - */ - "WebAudio.audioNodeWillBeDestroyed": [ - Protocol.WebAudio.AudioNodeWillBeDestroyedEvent, - ]; - /** - * Notifies that a new AudioParam has been created. - */ - "WebAudio.audioParamCreated": [Protocol.WebAudio.AudioParamCreatedEvent]; - /** - * Notifies that an existing AudioParam has been destroyed. - */ - "WebAudio.audioParamWillBeDestroyed": [ - Protocol.WebAudio.AudioParamWillBeDestroyedEvent, - ]; - /** - * Notifies that two AudioNodes are connected. - */ - "WebAudio.nodesConnected": [Protocol.WebAudio.NodesConnectedEvent]; - /** - * Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected. - */ - "WebAudio.nodesDisconnected": [Protocol.WebAudio.NodesDisconnectedEvent]; - /** - * Notifies that an AudioNode is connected to an AudioParam. - */ - "WebAudio.nodeParamConnected": [Protocol.WebAudio.NodeParamConnectedEvent]; - /** - * Notifies that an AudioNode is disconnected to an AudioParam. - */ - "WebAudio.nodeParamDisconnected": [ - Protocol.WebAudio.NodeParamDisconnectedEvent, - ]; - /** - * This can be called multiple times, and can be used to set / override / - * remove player properties. A null propValue indicates removal. - */ - "Media.playerPropertiesChanged": [ - Protocol.Media.PlayerPropertiesChangedEvent, - ]; - /** - * Send events as a list, allowing them to be batched on the browser for less - * congestion. If batched, events must ALWAYS be in chronological order. - */ - "Media.playerEventsAdded": [Protocol.Media.PlayerEventsAddedEvent]; - /** - * Send a list of any messages that need to be delivered. - */ - "Media.playerMessagesLogged": [Protocol.Media.PlayerMessagesLoggedEvent]; - /** - * Send a list of any errors that need to be delivered. - */ - "Media.playerErrorsRaised": [Protocol.Media.PlayerErrorsRaisedEvent]; - /** - * Called whenever a player is created, or when a new agent joins and recieves - * a list of active players. If an agent is restored, it will recieve the full - * list of player ids and all events again. - */ - "Media.playersCreated": [Protocol.Media.PlayersCreatedEvent]; - } - - export interface Commands { - /** - * Does nothing. - */ - "Console.clearMessages": { - paramsType: []; - returnType: void; - }; - /** - * Disables console domain, prevents further console messages from being reported to the client. - */ - "Console.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables console domain, sends the messages collected so far to the client by means of the - * `messageAdded` notification. - */ - "Console.enable": { - paramsType: []; - returnType: void; - }; - /** - * Continues execution until specific location is reached. - */ - "Debugger.continueToLocation": { - paramsType: [Protocol.Debugger.ContinueToLocationRequest]; - returnType: void; - }; - /** - * Disables debugger for given page. - */ - "Debugger.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables debugger for the given page. Clients should not assume that the debugging has been - * enabled until the result for this command is received. - */ - "Debugger.enable": { - paramsType: [Protocol.Debugger.EnableRequest?]; - returnType: Protocol.Debugger.EnableResponse; - }; - /** - * Evaluates expression on a given call frame. - */ - "Debugger.evaluateOnCallFrame": { - paramsType: [Protocol.Debugger.EvaluateOnCallFrameRequest]; - returnType: Protocol.Debugger.EvaluateOnCallFrameResponse; - }; - /** - * Execute a Wasm Evaluator module on a given call frame. - */ - "Debugger.executeWasmEvaluator": { - paramsType: [Protocol.Debugger.ExecuteWasmEvaluatorRequest]; - returnType: Protocol.Debugger.ExecuteWasmEvaluatorResponse; - }; - /** - * Returns possible locations for breakpoint. scriptId in start and end range locations should be - * the same. - */ - "Debugger.getPossibleBreakpoints": { - paramsType: [Protocol.Debugger.GetPossibleBreakpointsRequest]; - returnType: Protocol.Debugger.GetPossibleBreakpointsResponse; - }; - /** - * Returns source for the script with given id. - */ - "Debugger.getScriptSource": { - paramsType: [Protocol.Debugger.GetScriptSourceRequest]; - returnType: Protocol.Debugger.GetScriptSourceResponse; - }; - /** - * This command is deprecated. Use getScriptSource instead. - */ - "Debugger.getWasmBytecode": { - paramsType: [Protocol.Debugger.GetWasmBytecodeRequest]; - returnType: Protocol.Debugger.GetWasmBytecodeResponse; - }; - /** - * Returns stack trace with given `stackTraceId`. - */ - "Debugger.getStackTrace": { - paramsType: [Protocol.Debugger.GetStackTraceRequest]; - returnType: Protocol.Debugger.GetStackTraceResponse; - }; - /** - * Stops on the next JavaScript statement. - */ - "Debugger.pause": { - paramsType: []; - returnType: void; - }; - "Debugger.pauseOnAsyncCall": { - paramsType: [Protocol.Debugger.PauseOnAsyncCallRequest]; - returnType: void; - }; - /** - * Removes JavaScript breakpoint. - */ - "Debugger.removeBreakpoint": { - paramsType: [Protocol.Debugger.RemoveBreakpointRequest]; - returnType: void; - }; - /** - * Restarts particular call frame from the beginning. - */ - "Debugger.restartFrame": { - paramsType: [Protocol.Debugger.RestartFrameRequest]; - returnType: Protocol.Debugger.RestartFrameResponse; - }; - /** - * Resumes JavaScript execution. - */ - "Debugger.resume": { - paramsType: [Protocol.Debugger.ResumeRequest?]; - returnType: void; - }; - /** - * Searches for given string in script content. - */ - "Debugger.searchInContent": { - paramsType: [Protocol.Debugger.SearchInContentRequest]; - returnType: Protocol.Debugger.SearchInContentResponse; - }; - /** - * Enables or disables async call stacks tracking. - */ - "Debugger.setAsyncCallStackDepth": { - paramsType: [Protocol.Debugger.SetAsyncCallStackDepthRequest]; - returnType: void; - }; - /** - * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in - * scripts with url matching one of the patterns. VM will try to leave blackboxed script by - * performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - */ - "Debugger.setBlackboxPatterns": { - paramsType: [Protocol.Debugger.SetBlackboxPatternsRequest]; - returnType: void; - }; - /** - * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted - * scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - * Positions array contains positions where blackbox state is changed. First interval isn't - * blackboxed. Array should be sorted. - */ - "Debugger.setBlackboxedRanges": { - paramsType: [Protocol.Debugger.SetBlackboxedRangesRequest]; - returnType: void; - }; - /** - * Sets JavaScript breakpoint at a given location. - */ - "Debugger.setBreakpoint": { - paramsType: [Protocol.Debugger.SetBreakpointRequest]; - returnType: Protocol.Debugger.SetBreakpointResponse; - }; - /** - * Sets instrumentation breakpoint. - */ - "Debugger.setInstrumentationBreakpoint": { - paramsType: [Protocol.Debugger.SetInstrumentationBreakpointRequest]; - returnType: Protocol.Debugger.SetInstrumentationBreakpointResponse; - }; - /** - * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this - * command is issued, all existing parsed scripts will have breakpoints resolved and returned in - * `locations` property. Further matching script parsing will result in subsequent - * `breakpointResolved` events issued. This logical breakpoint will survive page reloads. - */ - "Debugger.setBreakpointByUrl": { - paramsType: [Protocol.Debugger.SetBreakpointByUrlRequest]; - returnType: Protocol.Debugger.SetBreakpointByUrlResponse; - }; - /** - * Sets JavaScript breakpoint before each call to the given function. - * If another function was created from the same source as a given one, - * calling it will also trigger the breakpoint. - */ - "Debugger.setBreakpointOnFunctionCall": { - paramsType: [Protocol.Debugger.SetBreakpointOnFunctionCallRequest]; - returnType: Protocol.Debugger.SetBreakpointOnFunctionCallResponse; - }; - /** - * Activates / deactivates all breakpoints on the page. - */ - "Debugger.setBreakpointsActive": { - paramsType: [Protocol.Debugger.SetBreakpointsActiveRequest]; - returnType: void; - }; - /** - * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or - * no exceptions. Initial pause on exceptions state is `none`. - */ - "Debugger.setPauseOnExceptions": { - paramsType: [Protocol.Debugger.SetPauseOnExceptionsRequest]; - returnType: void; - }; - /** - * Changes return value in top frame. Available only at return break position. - */ - "Debugger.setReturnValue": { - paramsType: [Protocol.Debugger.SetReturnValueRequest]; - returnType: void; - }; - /** - * Edits JavaScript source live. - */ - "Debugger.setScriptSource": { - paramsType: [Protocol.Debugger.SetScriptSourceRequest]; - returnType: Protocol.Debugger.SetScriptSourceResponse; - }; - /** - * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). - */ - "Debugger.setSkipAllPauses": { - paramsType: [Protocol.Debugger.SetSkipAllPausesRequest]; - returnType: void; - }; - /** - * Changes value of variable in a callframe. Object-based scopes are not supported and must be - * mutated manually. - */ - "Debugger.setVariableValue": { - paramsType: [Protocol.Debugger.SetVariableValueRequest]; - returnType: void; - }; - /** - * Steps into the function call. - */ - "Debugger.stepInto": { - paramsType: [Protocol.Debugger.StepIntoRequest?]; - returnType: void; - }; - /** - * Steps out of the function call. - */ - "Debugger.stepOut": { - paramsType: []; - returnType: void; - }; - /** - * Steps over the statement. - */ - "Debugger.stepOver": { - paramsType: [Protocol.Debugger.StepOverRequest?]; - returnType: void; - }; - /** - * Enables console to refer to the node with given id via $x (see Command Line API for more details - * $x functions). - */ - "HeapProfiler.addInspectedHeapObject": { - paramsType: [Protocol.HeapProfiler.AddInspectedHeapObjectRequest]; - returnType: void; - }; - "HeapProfiler.collectGarbage": { - paramsType: []; - returnType: void; - }; - "HeapProfiler.disable": { - paramsType: []; - returnType: void; - }; - "HeapProfiler.enable": { - paramsType: []; - returnType: void; - }; - "HeapProfiler.getHeapObjectId": { - paramsType: [Protocol.HeapProfiler.GetHeapObjectIdRequest]; - returnType: Protocol.HeapProfiler.GetHeapObjectIdResponse; - }; - "HeapProfiler.getObjectByHeapObjectId": { - paramsType: [Protocol.HeapProfiler.GetObjectByHeapObjectIdRequest]; - returnType: Protocol.HeapProfiler.GetObjectByHeapObjectIdResponse; - }; - "HeapProfiler.getSamplingProfile": { - paramsType: []; - returnType: Protocol.HeapProfiler.GetSamplingProfileResponse; - }; - "HeapProfiler.startSampling": { - paramsType: [Protocol.HeapProfiler.StartSamplingRequest?]; - returnType: void; - }; - "HeapProfiler.startTrackingHeapObjects": { - paramsType: [Protocol.HeapProfiler.StartTrackingHeapObjectsRequest?]; - returnType: void; - }; - "HeapProfiler.stopSampling": { - paramsType: []; - returnType: Protocol.HeapProfiler.StopSamplingResponse; - }; - "HeapProfiler.stopTrackingHeapObjects": { - paramsType: [Protocol.HeapProfiler.StopTrackingHeapObjectsRequest?]; - returnType: void; - }; - "HeapProfiler.takeHeapSnapshot": { - paramsType: [Protocol.HeapProfiler.TakeHeapSnapshotRequest?]; - returnType: void; - }; - "Profiler.disable": { - paramsType: []; - returnType: void; - }; - "Profiler.enable": { - paramsType: []; - returnType: void; - }; - /** - * Collect coverage data for the current isolate. The coverage data may be incomplete due to - * garbage collection. - */ - "Profiler.getBestEffortCoverage": { - paramsType: []; - returnType: Protocol.Profiler.GetBestEffortCoverageResponse; - }; - /** - * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. - */ - "Profiler.setSamplingInterval": { - paramsType: [Protocol.Profiler.SetSamplingIntervalRequest]; - returnType: void; - }; - "Profiler.start": { - paramsType: []; - returnType: void; - }; - /** - * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code - * coverage may be incomplete. Enabling prevents running optimized code and resets execution - * counters. - */ - "Profiler.startPreciseCoverage": { - paramsType: [Protocol.Profiler.StartPreciseCoverageRequest?]; - returnType: Protocol.Profiler.StartPreciseCoverageResponse; - }; - /** - * Enable type profile. - */ - "Profiler.startTypeProfile": { - paramsType: []; - returnType: void; - }; - "Profiler.stop": { - paramsType: []; - returnType: Protocol.Profiler.StopResponse; - }; - /** - * Disable precise code coverage. Disabling releases unnecessary execution count records and allows - * executing optimized code. - */ - "Profiler.stopPreciseCoverage": { - paramsType: []; - returnType: void; - }; - /** - * Disable type profile. Disabling releases type profile data collected so far. - */ - "Profiler.stopTypeProfile": { - paramsType: []; - returnType: void; - }; - /** - * Collect coverage data for the current isolate, and resets execution counters. Precise code - * coverage needs to have started. - */ - "Profiler.takePreciseCoverage": { - paramsType: []; - returnType: Protocol.Profiler.TakePreciseCoverageResponse; - }; - /** - * Collect type profile. - */ - "Profiler.takeTypeProfile": { - paramsType: []; - returnType: Protocol.Profiler.TakeTypeProfileResponse; - }; - /** - * Enable counters collection. - */ - "Profiler.enableCounters": { - paramsType: []; - returnType: void; - }; - /** - * Disable counters collection. - */ - "Profiler.disableCounters": { - paramsType: []; - returnType: void; - }; - /** - * Retrieve counters. - */ - "Profiler.getCounters": { - paramsType: []; - returnType: Protocol.Profiler.GetCountersResponse; - }; - /** - * Enable run time call stats collection. - */ - "Profiler.enableRuntimeCallStats": { - paramsType: []; - returnType: void; - }; - /** - * Disable run time call stats collection. - */ - "Profiler.disableRuntimeCallStats": { - paramsType: []; - returnType: void; - }; - /** - * Retrieve run time call stats. - */ - "Profiler.getRuntimeCallStats": { - paramsType: []; - returnType: Protocol.Profiler.GetRuntimeCallStatsResponse; - }; - /** - * Add handler to promise with given promise object id. - */ - "Runtime.awaitPromise": { - paramsType: [Protocol.Runtime.AwaitPromiseRequest]; - returnType: Protocol.Runtime.AwaitPromiseResponse; - }; - /** - * Calls function with given declaration on the given object. Object group of the result is - * inherited from the target object. - */ - "Runtime.callFunctionOn": { - paramsType: [Protocol.Runtime.CallFunctionOnRequest]; - returnType: Protocol.Runtime.CallFunctionOnResponse; - }; - /** - * Compiles expression. - */ - "Runtime.compileScript": { - paramsType: [Protocol.Runtime.CompileScriptRequest]; - returnType: Protocol.Runtime.CompileScriptResponse; - }; - /** - * Disables reporting of execution contexts creation. - */ - "Runtime.disable": { - paramsType: []; - returnType: void; - }; - /** - * Discards collected exceptions and console API calls. - */ - "Runtime.discardConsoleEntries": { - paramsType: []; - returnType: void; - }; - /** - * Enables reporting of execution contexts creation by means of `executionContextCreated` event. - * When the reporting gets enabled the event will be sent immediately for each existing execution - * context. - */ - "Runtime.enable": { - paramsType: []; - returnType: void; - }; - /** - * Evaluates expression on global object. - */ - "Runtime.evaluate": { - paramsType: [Protocol.Runtime.EvaluateRequest]; - returnType: Protocol.Runtime.EvaluateResponse; - }; - /** - * Returns the isolate id. - */ - "Runtime.getIsolateId": { - paramsType: []; - returnType: Protocol.Runtime.GetIsolateIdResponse; - }; - /** - * Returns the JavaScript heap usage. - * It is the total usage of the corresponding isolate not scoped to a particular Runtime. - */ - "Runtime.getHeapUsage": { - paramsType: []; - returnType: Protocol.Runtime.GetHeapUsageResponse; - }; - /** - * Returns properties of a given object. Object group of the result is inherited from the target - * object. - */ - "Runtime.getProperties": { - paramsType: [Protocol.Runtime.GetPropertiesRequest]; - returnType: Protocol.Runtime.GetPropertiesResponse; - }; - /** - * Returns all let, const and class variables from global scope. - */ - "Runtime.globalLexicalScopeNames": { - paramsType: [Protocol.Runtime.GlobalLexicalScopeNamesRequest?]; - returnType: Protocol.Runtime.GlobalLexicalScopeNamesResponse; - }; - "Runtime.queryObjects": { - paramsType: [Protocol.Runtime.QueryObjectsRequest]; - returnType: Protocol.Runtime.QueryObjectsResponse; - }; - /** - * Releases remote object with given id. - */ - "Runtime.releaseObject": { - paramsType: [Protocol.Runtime.ReleaseObjectRequest]; - returnType: void; - }; - /** - * Releases all remote objects that belong to a given group. - */ - "Runtime.releaseObjectGroup": { - paramsType: [Protocol.Runtime.ReleaseObjectGroupRequest]; - returnType: void; - }; - /** - * Tells inspected instance to run if it was waiting for debugger to attach. - */ - "Runtime.runIfWaitingForDebugger": { - paramsType: []; - returnType: void; - }; - /** - * Runs script with given id in a given context. - */ - "Runtime.runScript": { - paramsType: [Protocol.Runtime.RunScriptRequest]; - returnType: Protocol.Runtime.RunScriptResponse; - }; - /** - * Enables or disables async call stacks tracking. - */ - "Runtime.setAsyncCallStackDepth": { - paramsType: [Protocol.Runtime.SetAsyncCallStackDepthRequest]; - returnType: void; - }; - "Runtime.setCustomObjectFormatterEnabled": { - paramsType: [Protocol.Runtime.SetCustomObjectFormatterEnabledRequest]; - returnType: void; - }; - "Runtime.setMaxCallStackSizeToCapture": { - paramsType: [Protocol.Runtime.SetMaxCallStackSizeToCaptureRequest]; - returnType: void; - }; - /** - * Terminate current or next JavaScript execution. - * Will cancel the termination when the outer-most script execution ends. - */ - "Runtime.terminateExecution": { - paramsType: []; - returnType: void; - }; - /** - * If executionContextId is empty, adds binding with the given name on the - * global objects of all inspected contexts, including those created later, - * bindings survive reloads. - * If executionContextId is specified, adds binding only on global object of - * given execution context. - * Binding function takes exactly one argument, this argument should be string, - * in case of any other input, function throws an exception. - * Each binding function call produces Runtime.bindingCalled notification. - */ - "Runtime.addBinding": { - paramsType: [Protocol.Runtime.AddBindingRequest]; - returnType: void; - }; - /** - * This method does not remove binding function from global object but - * unsubscribes current runtime agent from Runtime.bindingCalled notifications. - */ - "Runtime.removeBinding": { - paramsType: [Protocol.Runtime.RemoveBindingRequest]; - returnType: void; - }; - /** - * Returns supported domains. - */ - "Schema.getDomains": { - paramsType: []; - returnType: Protocol.Schema.GetDomainsResponse; - }; - /** - * Disables the accessibility domain. - */ - "Accessibility.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls. - * This turns on accessibility for the page, which can impact performance until accessibility is disabled. - */ - "Accessibility.enable": { - paramsType: []; - returnType: void; - }; - /** - * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists. - */ - "Accessibility.getPartialAXTree": { - paramsType: [Protocol.Accessibility.GetPartialAXTreeRequest?]; - returnType: Protocol.Accessibility.GetPartialAXTreeResponse; - }; - /** - * Fetches the entire accessibility tree - */ - "Accessibility.getFullAXTree": { - paramsType: []; - returnType: Protocol.Accessibility.GetFullAXTreeResponse; - }; - /** - * Query a DOM node's accessibility subtree for accessible name and role. - * This command computes the name and role for all nodes in the subtree, including those that are - * ignored for accessibility, and returns those that mactch the specified name and role. If no DOM - * node is specified, or the DOM node does not exist, the command returns an error. If neither - * `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree. - */ - "Accessibility.queryAXTree": { - paramsType: [Protocol.Accessibility.QueryAXTreeRequest?]; - returnType: Protocol.Accessibility.QueryAXTreeResponse; - }; - /** - * Disables animation domain notifications. - */ - "Animation.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables animation domain notifications. - */ - "Animation.enable": { - paramsType: []; - returnType: void; - }; - /** - * Returns the current time of the an animation. - */ - "Animation.getCurrentTime": { - paramsType: [Protocol.Animation.GetCurrentTimeRequest]; - returnType: Protocol.Animation.GetCurrentTimeResponse; - }; - /** - * Gets the playback rate of the document timeline. - */ - "Animation.getPlaybackRate": { - paramsType: []; - returnType: Protocol.Animation.GetPlaybackRateResponse; - }; - /** - * Releases a set of animations to no longer be manipulated. - */ - "Animation.releaseAnimations": { - paramsType: [Protocol.Animation.ReleaseAnimationsRequest]; - returnType: void; - }; - /** - * Gets the remote object of the Animation. - */ - "Animation.resolveAnimation": { - paramsType: [Protocol.Animation.ResolveAnimationRequest]; - returnType: Protocol.Animation.ResolveAnimationResponse; - }; - /** - * Seek a set of animations to a particular time within each animation. - */ - "Animation.seekAnimations": { - paramsType: [Protocol.Animation.SeekAnimationsRequest]; - returnType: void; - }; - /** - * Sets the paused state of a set of animations. - */ - "Animation.setPaused": { - paramsType: [Protocol.Animation.SetPausedRequest]; - returnType: void; - }; - /** - * Sets the playback rate of the document timeline. - */ - "Animation.setPlaybackRate": { - paramsType: [Protocol.Animation.SetPlaybackRateRequest]; - returnType: void; - }; - /** - * Sets the timing of an animation node. - */ - "Animation.setTiming": { - paramsType: [Protocol.Animation.SetTimingRequest]; - returnType: void; - }; - /** - * Enables application cache domain notifications. - */ - "ApplicationCache.enable": { - paramsType: []; - returnType: void; - }; - /** - * Returns relevant application cache data for the document in given frame. - */ - "ApplicationCache.getApplicationCacheForFrame": { - paramsType: [ - Protocol.ApplicationCache.GetApplicationCacheForFrameRequest, - ]; - returnType: Protocol.ApplicationCache.GetApplicationCacheForFrameResponse; - }; - /** - * Returns array of frame identifiers with manifest urls for each frame containing a document - * associated with some application cache. - */ - "ApplicationCache.getFramesWithManifests": { - paramsType: []; - returnType: Protocol.ApplicationCache.GetFramesWithManifestsResponse; - }; - /** - * Returns manifest URL for document in the given frame. - */ - "ApplicationCache.getManifestForFrame": { - paramsType: [Protocol.ApplicationCache.GetManifestForFrameRequest]; - returnType: Protocol.ApplicationCache.GetManifestForFrameResponse; - }; - /** - * Returns the response body and size if it were re-encoded with the specified settings. Only - * applies to images. - */ - "Audits.getEncodedResponse": { - paramsType: [Protocol.Audits.GetEncodedResponseRequest]; - returnType: Protocol.Audits.GetEncodedResponseResponse; - }; - /** - * Disables issues domain, prevents further issues from being reported to the client. - */ - "Audits.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables issues domain, sends the issues collected so far to the client by means of the - * `issueAdded` event. - */ - "Audits.enable": { - paramsType: []; - returnType: void; - }; - /** - * Enables event updates for the service. - */ - "BackgroundService.startObserving": { - paramsType: [Protocol.BackgroundService.StartObservingRequest]; - returnType: void; - }; - /** - * Disables event updates for the service. - */ - "BackgroundService.stopObserving": { - paramsType: [Protocol.BackgroundService.StopObservingRequest]; - returnType: void; - }; - /** - * Set the recording state for the service. - */ - "BackgroundService.setRecording": { - paramsType: [Protocol.BackgroundService.SetRecordingRequest]; - returnType: void; - }; - /** - * Clears all stored data for the service. - */ - "BackgroundService.clearEvents": { - paramsType: [Protocol.BackgroundService.ClearEventsRequest]; - returnType: void; - }; - /** - * Set permission settings for given origin. - */ - "Browser.setPermission": { - paramsType: [Protocol.Browser.SetPermissionRequest]; - returnType: void; - }; - /** - * Grant specific permissions to the given origin and reject all others. - */ - "Browser.grantPermissions": { - paramsType: [Protocol.Browser.GrantPermissionsRequest]; - returnType: void; - }; - /** - * Reset all permission management for all origins. - */ - "Browser.resetPermissions": { - paramsType: [Protocol.Browser.ResetPermissionsRequest?]; - returnType: void; - }; - /** - * Set the behavior when downloading a file. - */ - "Browser.setDownloadBehavior": { - paramsType: [Protocol.Browser.SetDownloadBehaviorRequest]; - returnType: void; - }; - /** - * Close browser gracefully. - */ - "Browser.close": { - paramsType: []; - returnType: void; - }; - /** - * Crashes browser on the main thread. - */ - "Browser.crash": { - paramsType: []; - returnType: void; - }; - /** - * Crashes GPU process. - */ - "Browser.crashGpuProcess": { - paramsType: []; - returnType: void; - }; - /** - * Returns version information. - */ - "Browser.getVersion": { - paramsType: []; - returnType: Protocol.Browser.GetVersionResponse; - }; - /** - * Returns the command line switches for the browser process if, and only if - * --enable-automation is on the commandline. - */ - "Browser.getBrowserCommandLine": { - paramsType: []; - returnType: Protocol.Browser.GetBrowserCommandLineResponse; - }; - /** - * Get Chrome histograms. - */ - "Browser.getHistograms": { - paramsType: [Protocol.Browser.GetHistogramsRequest?]; - returnType: Protocol.Browser.GetHistogramsResponse; - }; - /** - * Get a Chrome histogram by name. - */ - "Browser.getHistogram": { - paramsType: [Protocol.Browser.GetHistogramRequest]; - returnType: Protocol.Browser.GetHistogramResponse; - }; - /** - * Get position and size of the browser window. - */ - "Browser.getWindowBounds": { - paramsType: [Protocol.Browser.GetWindowBoundsRequest]; - returnType: Protocol.Browser.GetWindowBoundsResponse; - }; - /** - * Get the browser window that contains the devtools target. - */ - "Browser.getWindowForTarget": { - paramsType: [Protocol.Browser.GetWindowForTargetRequest?]; - returnType: Protocol.Browser.GetWindowForTargetResponse; - }; - /** - * Set position and/or size of the browser window. - */ - "Browser.setWindowBounds": { - paramsType: [Protocol.Browser.SetWindowBoundsRequest]; - returnType: void; - }; - /** - * Set dock tile details, platform-specific. - */ - "Browser.setDockTile": { - paramsType: [Protocol.Browser.SetDockTileRequest?]; - returnType: void; - }; - /** - * Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the - * position specified by `location`. - */ - "CSS.addRule": { - paramsType: [Protocol.CSS.AddRuleRequest]; - returnType: Protocol.CSS.AddRuleResponse; - }; - /** - * Returns all class names from specified stylesheet. - */ - "CSS.collectClassNames": { - paramsType: [Protocol.CSS.CollectClassNamesRequest]; - returnType: Protocol.CSS.CollectClassNamesResponse; - }; - /** - * Creates a new special "via-inspector" stylesheet in the frame with given `frameId`. - */ - "CSS.createStyleSheet": { - paramsType: [Protocol.CSS.CreateStyleSheetRequest]; - returnType: Protocol.CSS.CreateStyleSheetResponse; - }; - /** - * Disables the CSS agent for the given page. - */ - "CSS.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been - * enabled until the result of this command is received. - */ - "CSS.enable": { - paramsType: []; - returnType: void; - }; - /** - * Ensures that the given node will have specified pseudo-classes whenever its style is computed by - * the browser. - */ - "CSS.forcePseudoState": { - paramsType: [Protocol.CSS.ForcePseudoStateRequest]; - returnType: void; - }; - "CSS.getBackgroundColors": { - paramsType: [Protocol.CSS.GetBackgroundColorsRequest]; - returnType: Protocol.CSS.GetBackgroundColorsResponse; - }; - /** - * Returns the computed style for a DOM node identified by `nodeId`. - */ - "CSS.getComputedStyleForNode": { - paramsType: [Protocol.CSS.GetComputedStyleForNodeRequest]; - returnType: Protocol.CSS.GetComputedStyleForNodeResponse; - }; - /** - * Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM - * attributes) for a DOM node identified by `nodeId`. - */ - "CSS.getInlineStylesForNode": { - paramsType: [Protocol.CSS.GetInlineStylesForNodeRequest]; - returnType: Protocol.CSS.GetInlineStylesForNodeResponse; - }; - /** - * Returns requested styles for a DOM node identified by `nodeId`. - */ - "CSS.getMatchedStylesForNode": { - paramsType: [Protocol.CSS.GetMatchedStylesForNodeRequest]; - returnType: Protocol.CSS.GetMatchedStylesForNodeResponse; - }; - /** - * Returns all media queries parsed by the rendering engine. - */ - "CSS.getMediaQueries": { - paramsType: []; - returnType: Protocol.CSS.GetMediaQueriesResponse; - }; - /** - * Requests information about platform fonts which we used to render child TextNodes in the given - * node. - */ - "CSS.getPlatformFontsForNode": { - paramsType: [Protocol.CSS.GetPlatformFontsForNodeRequest]; - returnType: Protocol.CSS.GetPlatformFontsForNodeResponse; - }; - /** - * Returns the current textual content for a stylesheet. - */ - "CSS.getStyleSheetText": { - paramsType: [Protocol.CSS.GetStyleSheetTextRequest]; - returnType: Protocol.CSS.GetStyleSheetTextResponse; - }; - /** - * Starts tracking the given computed styles for updates. The specified array of properties - * replaces the one previously specified. Pass empty array to disable tracking. - * Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified. - * The changes to computed style properties are only tracked for nodes pushed to the front-end - * by the DOM agent. If no changes to the tracked properties occur after the node has been pushed - * to the front-end, no updates will be issued for the node. - */ - "CSS.trackComputedStyleUpdates": { - paramsType: [Protocol.CSS.TrackComputedStyleUpdatesRequest]; - returnType: void; - }; - /** - * Polls the next batch of computed style updates. - */ - "CSS.takeComputedStyleUpdates": { - paramsType: []; - returnType: Protocol.CSS.TakeComputedStyleUpdatesResponse; - }; - /** - * Find a rule with the given active property for the given node and set the new value for this - * property - */ - "CSS.setEffectivePropertyValueForNode": { - paramsType: [Protocol.CSS.SetEffectivePropertyValueForNodeRequest]; - returnType: void; - }; - /** - * Modifies the keyframe rule key text. - */ - "CSS.setKeyframeKey": { - paramsType: [Protocol.CSS.SetKeyframeKeyRequest]; - returnType: Protocol.CSS.SetKeyframeKeyResponse; - }; - /** - * Modifies the rule selector. - */ - "CSS.setMediaText": { - paramsType: [Protocol.CSS.SetMediaTextRequest]; - returnType: Protocol.CSS.SetMediaTextResponse; - }; - /** - * Modifies the rule selector. - */ - "CSS.setRuleSelector": { - paramsType: [Protocol.CSS.SetRuleSelectorRequest]; - returnType: Protocol.CSS.SetRuleSelectorResponse; - }; - /** - * Sets the new stylesheet text. - */ - "CSS.setStyleSheetText": { - paramsType: [Protocol.CSS.SetStyleSheetTextRequest]; - returnType: Protocol.CSS.SetStyleSheetTextResponse; - }; - /** - * Applies specified style edits one after another in the given order. - */ - "CSS.setStyleTexts": { - paramsType: [Protocol.CSS.SetStyleTextsRequest]; - returnType: Protocol.CSS.SetStyleTextsResponse; - }; - /** - * Enables the selector recording. - */ - "CSS.startRuleUsageTracking": { - paramsType: []; - returnType: void; - }; - /** - * Stop tracking rule usage and return the list of rules that were used since last call to - * `takeCoverageDelta` (or since start of coverage instrumentation) - */ - "CSS.stopRuleUsageTracking": { - paramsType: []; - returnType: Protocol.CSS.StopRuleUsageTrackingResponse; - }; - /** - * Obtain list of rules that became used since last call to this method (or since start of coverage - * instrumentation) - */ - "CSS.takeCoverageDelta": { - paramsType: []; - returnType: Protocol.CSS.TakeCoverageDeltaResponse; - }; - /** - * Enables/disables rendering of local CSS fonts (enabled by default). - */ - "CSS.setLocalFontsEnabled": { - paramsType: [Protocol.CSS.SetLocalFontsEnabledRequest]; - returnType: void; - }; - /** - * Deletes a cache. - */ - "CacheStorage.deleteCache": { - paramsType: [Protocol.CacheStorage.DeleteCacheRequest]; - returnType: void; - }; - /** - * Deletes a cache entry. - */ - "CacheStorage.deleteEntry": { - paramsType: [Protocol.CacheStorage.DeleteEntryRequest]; - returnType: void; - }; - /** - * Requests cache names. - */ - "CacheStorage.requestCacheNames": { - paramsType: [Protocol.CacheStorage.RequestCacheNamesRequest]; - returnType: Protocol.CacheStorage.RequestCacheNamesResponse; - }; - /** - * Fetches cache entry. - */ - "CacheStorage.requestCachedResponse": { - paramsType: [Protocol.CacheStorage.RequestCachedResponseRequest]; - returnType: Protocol.CacheStorage.RequestCachedResponseResponse; - }; - /** - * Requests data from cache. - */ - "CacheStorage.requestEntries": { - paramsType: [Protocol.CacheStorage.RequestEntriesRequest]; - returnType: Protocol.CacheStorage.RequestEntriesResponse; - }; - /** - * Starts observing for sinks that can be used for tab mirroring, and if set, - * sinks compatible with |presentationUrl| as well. When sinks are found, a - * |sinksUpdated| event is fired. - * Also starts observing for issue messages. When an issue is added or removed, - * an |issueUpdated| event is fired. - */ - "Cast.enable": { - paramsType: [Protocol.Cast.EnableRequest?]; - returnType: void; - }; - /** - * Stops observing for sinks and issues. - */ - "Cast.disable": { - paramsType: []; - returnType: void; - }; - /** - * Sets a sink to be used when the web page requests the browser to choose a - * sink via Presentation API, Remote Playback API, or Cast SDK. - */ - "Cast.setSinkToUse": { - paramsType: [Protocol.Cast.SetSinkToUseRequest]; - returnType: void; - }; - /** - * Starts mirroring the tab to the sink. - */ - "Cast.startTabMirroring": { - paramsType: [Protocol.Cast.StartTabMirroringRequest]; - returnType: void; - }; - /** - * Stops the active Cast session on the sink. - */ - "Cast.stopCasting": { - paramsType: [Protocol.Cast.StopCastingRequest]; - returnType: void; - }; - /** - * Collects class names for the node with given id and all of it's child nodes. - */ - "DOM.collectClassNamesFromSubtree": { - paramsType: [Protocol.DOM.CollectClassNamesFromSubtreeRequest]; - returnType: Protocol.DOM.CollectClassNamesFromSubtreeResponse; - }; - /** - * Creates a deep copy of the specified node and places it into the target container before the - * given anchor. - */ - "DOM.copyTo": { - paramsType: [Protocol.DOM.CopyToRequest]; - returnType: Protocol.DOM.CopyToResponse; - }; - /** - * Describes node given its id, does not require domain to be enabled. Does not start tracking any - * objects, can be used for automation. - */ - "DOM.describeNode": { - paramsType: [Protocol.DOM.DescribeNodeRequest?]; - returnType: Protocol.DOM.DescribeNodeResponse; - }; - /** - * Scrolls the specified rect of the given node into view if not already visible. - * Note: exactly one between nodeId, backendNodeId and objectId should be passed - * to identify the node. - */ - "DOM.scrollIntoViewIfNeeded": { - paramsType: [Protocol.DOM.ScrollIntoViewIfNeededRequest?]; - returnType: void; - }; - /** - * Disables DOM agent for the given page. - */ - "DOM.disable": { - paramsType: []; - returnType: void; - }; - /** - * Discards search results from the session with the given id. `getSearchResults` should no longer - * be called for that search. - */ - "DOM.discardSearchResults": { - paramsType: [Protocol.DOM.DiscardSearchResultsRequest]; - returnType: void; - }; - /** - * Enables DOM agent for the given page. - */ - "DOM.enable": { - paramsType: []; - returnType: void; - }; - /** - * Focuses the given element. - */ - "DOM.focus": { - paramsType: [Protocol.DOM.FocusRequest?]; - returnType: void; - }; - /** - * Returns attributes for the specified node. - */ - "DOM.getAttributes": { - paramsType: [Protocol.DOM.GetAttributesRequest]; - returnType: Protocol.DOM.GetAttributesResponse; - }; - /** - * Returns boxes for the given node. - */ - "DOM.getBoxModel": { - paramsType: [Protocol.DOM.GetBoxModelRequest?]; - returnType: Protocol.DOM.GetBoxModelResponse; - }; - /** - * Returns quads that describe node position on the page. This method - * might return multiple quads for inline nodes. - */ - "DOM.getContentQuads": { - paramsType: [Protocol.DOM.GetContentQuadsRequest?]; - returnType: Protocol.DOM.GetContentQuadsResponse; - }; - /** - * Returns the root DOM node (and optionally the subtree) to the caller. - */ - "DOM.getDocument": { - paramsType: [Protocol.DOM.GetDocumentRequest?]; - returnType: Protocol.DOM.GetDocumentResponse; - }; - /** - * Returns the root DOM node (and optionally the subtree) to the caller. - * Deprecated, as it is not designed to work well with the rest of the DOM agent. - * Use DOMSnapshot.captureSnapshot instead. - */ - "DOM.getFlattenedDocument": { - paramsType: [Protocol.DOM.GetFlattenedDocumentRequest?]; - returnType: Protocol.DOM.GetFlattenedDocumentResponse; - }; - /** - * Finds nodes with a given computed style in a subtree. - */ - "DOM.getNodesForSubtreeByStyle": { - paramsType: [Protocol.DOM.GetNodesForSubtreeByStyleRequest]; - returnType: Protocol.DOM.GetNodesForSubtreeByStyleResponse; - }; - /** - * Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is - * either returned or not. - */ - "DOM.getNodeForLocation": { - paramsType: [Protocol.DOM.GetNodeForLocationRequest]; - returnType: Protocol.DOM.GetNodeForLocationResponse; - }; - /** - * Returns node's HTML markup. - */ - "DOM.getOuterHTML": { - paramsType: [Protocol.DOM.GetOuterHTMLRequest?]; - returnType: Protocol.DOM.GetOuterHTMLResponse; - }; - /** - * Returns the id of the nearest ancestor that is a relayout boundary. - */ - "DOM.getRelayoutBoundary": { - paramsType: [Protocol.DOM.GetRelayoutBoundaryRequest]; - returnType: Protocol.DOM.GetRelayoutBoundaryResponse; - }; - /** - * Returns search results from given `fromIndex` to given `toIndex` from the search with the given - * identifier. - */ - "DOM.getSearchResults": { - paramsType: [Protocol.DOM.GetSearchResultsRequest]; - returnType: Protocol.DOM.GetSearchResultsResponse; - }; - /** - * Hides any highlight. - */ - "DOM.hideHighlight": { - paramsType: []; - returnType: void; - }; - /** - * Highlights DOM node. - */ - "DOM.highlightNode": { - paramsType: []; - returnType: void; - }; - /** - * Highlights given rectangle. - */ - "DOM.highlightRect": { - paramsType: []; - returnType: void; - }; - /** - * Marks last undoable state. - */ - "DOM.markUndoableState": { - paramsType: []; - returnType: void; - }; - /** - * Moves node into the new container, places it before the given anchor. - */ - "DOM.moveTo": { - paramsType: [Protocol.DOM.MoveToRequest]; - returnType: Protocol.DOM.MoveToResponse; - }; - /** - * Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or - * `cancelSearch` to end this search session. - */ - "DOM.performSearch": { - paramsType: [Protocol.DOM.PerformSearchRequest]; - returnType: Protocol.DOM.PerformSearchResponse; - }; - /** - * Requests that the node is sent to the caller given its path. // FIXME, use XPath - */ - "DOM.pushNodeByPathToFrontend": { - paramsType: [Protocol.DOM.PushNodeByPathToFrontendRequest]; - returnType: Protocol.DOM.PushNodeByPathToFrontendResponse; - }; - /** - * Requests that a batch of nodes is sent to the caller given their backend node ids. - */ - "DOM.pushNodesByBackendIdsToFrontend": { - paramsType: [Protocol.DOM.PushNodesByBackendIdsToFrontendRequest]; - returnType: Protocol.DOM.PushNodesByBackendIdsToFrontendResponse; - }; - /** - * Executes `querySelector` on a given node. - */ - "DOM.querySelector": { - paramsType: [Protocol.DOM.QuerySelectorRequest]; - returnType: Protocol.DOM.QuerySelectorResponse; - }; - /** - * Executes `querySelectorAll` on a given node. - */ - "DOM.querySelectorAll": { - paramsType: [Protocol.DOM.QuerySelectorAllRequest]; - returnType: Protocol.DOM.QuerySelectorAllResponse; - }; - /** - * Re-does the last undone action. - */ - "DOM.redo": { - paramsType: []; - returnType: void; - }; - /** - * Removes attribute with given name from an element with given id. - */ - "DOM.removeAttribute": { - paramsType: [Protocol.DOM.RemoveAttributeRequest]; - returnType: void; - }; - /** - * Removes node with given id. - */ - "DOM.removeNode": { - paramsType: [Protocol.DOM.RemoveNodeRequest]; - returnType: void; - }; - /** - * Requests that children of the node with given id are returned to the caller in form of - * `setChildNodes` events where not only immediate children are retrieved, but all children down to - * the specified depth. - */ - "DOM.requestChildNodes": { - paramsType: [Protocol.DOM.RequestChildNodesRequest]; - returnType: void; - }; - /** - * Requests that the node is sent to the caller given the JavaScript node object reference. All - * nodes that form the path from the node to the root are also sent to the client as a series of - * `setChildNodes` notifications. - */ - "DOM.requestNode": { - paramsType: [Protocol.DOM.RequestNodeRequest]; - returnType: Protocol.DOM.RequestNodeResponse; - }; - /** - * Resolves the JavaScript node object for a given NodeId or BackendNodeId. - */ - "DOM.resolveNode": { - paramsType: [Protocol.DOM.ResolveNodeRequest?]; - returnType: Protocol.DOM.ResolveNodeResponse; - }; - /** - * Sets attribute for an element with given id. - */ - "DOM.setAttributeValue": { - paramsType: [Protocol.DOM.SetAttributeValueRequest]; - returnType: void; - }; - /** - * Sets attributes on element with given id. This method is useful when user edits some existing - * attribute value and types in several attribute name/value pairs. - */ - "DOM.setAttributesAsText": { - paramsType: [Protocol.DOM.SetAttributesAsTextRequest]; - returnType: void; - }; - /** - * Sets files for the given file input element. - */ - "DOM.setFileInputFiles": { - paramsType: [Protocol.DOM.SetFileInputFilesRequest]; - returnType: void; - }; - /** - * Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled. - */ - "DOM.setNodeStackTracesEnabled": { - paramsType: [Protocol.DOM.SetNodeStackTracesEnabledRequest]; - returnType: void; - }; - /** - * Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation. - */ - "DOM.getNodeStackTraces": { - paramsType: [Protocol.DOM.GetNodeStackTracesRequest]; - returnType: Protocol.DOM.GetNodeStackTracesResponse; - }; - /** - * Returns file information for the given - * File wrapper. - */ - "DOM.getFileInfo": { - paramsType: [Protocol.DOM.GetFileInfoRequest]; - returnType: Protocol.DOM.GetFileInfoResponse; - }; - /** - * Enables console to refer to the node with given id via $x (see Command Line API for more details - * $x functions). - */ - "DOM.setInspectedNode": { - paramsType: [Protocol.DOM.SetInspectedNodeRequest]; - returnType: void; - }; - /** - * Sets node name for a node with given id. - */ - "DOM.setNodeName": { - paramsType: [Protocol.DOM.SetNodeNameRequest]; - returnType: Protocol.DOM.SetNodeNameResponse; - }; - /** - * Sets node value for a node with given id. - */ - "DOM.setNodeValue": { - paramsType: [Protocol.DOM.SetNodeValueRequest]; - returnType: void; - }; - /** - * Sets node HTML markup, returns new node id. - */ - "DOM.setOuterHTML": { - paramsType: [Protocol.DOM.SetOuterHTMLRequest]; - returnType: void; - }; - /** - * Undoes the last performed action. - */ - "DOM.undo": { - paramsType: []; - returnType: void; - }; - /** - * Returns iframe node that owns iframe with the given domain. - */ - "DOM.getFrameOwner": { - paramsType: [Protocol.DOM.GetFrameOwnerRequest]; - returnType: Protocol.DOM.GetFrameOwnerResponse; - }; - /** - * Returns event listeners of the given object. - */ - "DOMDebugger.getEventListeners": { - paramsType: [Protocol.DOMDebugger.GetEventListenersRequest]; - returnType: Protocol.DOMDebugger.GetEventListenersResponse; - }; - /** - * Removes DOM breakpoint that was set using `setDOMBreakpoint`. - */ - "DOMDebugger.removeDOMBreakpoint": { - paramsType: [Protocol.DOMDebugger.RemoveDOMBreakpointRequest]; - returnType: void; - }; - /** - * Removes breakpoint on particular DOM event. - */ - "DOMDebugger.removeEventListenerBreakpoint": { - paramsType: [Protocol.DOMDebugger.RemoveEventListenerBreakpointRequest]; - returnType: void; - }; - /** - * Removes breakpoint on particular native event. - */ - "DOMDebugger.removeInstrumentationBreakpoint": { - paramsType: [Protocol.DOMDebugger.RemoveInstrumentationBreakpointRequest]; - returnType: void; - }; - /** - * Removes breakpoint from XMLHttpRequest. - */ - "DOMDebugger.removeXHRBreakpoint": { - paramsType: [Protocol.DOMDebugger.RemoveXHRBreakpointRequest]; - returnType: void; - }; - /** - * Sets breakpoint on particular operation with DOM. - */ - "DOMDebugger.setDOMBreakpoint": { - paramsType: [Protocol.DOMDebugger.SetDOMBreakpointRequest]; - returnType: void; - }; - /** - * Sets breakpoint on particular DOM event. - */ - "DOMDebugger.setEventListenerBreakpoint": { - paramsType: [Protocol.DOMDebugger.SetEventListenerBreakpointRequest]; - returnType: void; - }; - /** - * Sets breakpoint on particular native event. - */ - "DOMDebugger.setInstrumentationBreakpoint": { - paramsType: [Protocol.DOMDebugger.SetInstrumentationBreakpointRequest]; - returnType: void; - }; - /** - * Sets breakpoint on XMLHttpRequest. - */ - "DOMDebugger.setXHRBreakpoint": { - paramsType: [Protocol.DOMDebugger.SetXHRBreakpointRequest]; - returnType: void; - }; - /** - * Disables DOM snapshot agent for the given page. - */ - "DOMSnapshot.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables DOM snapshot agent for the given page. - */ - "DOMSnapshot.enable": { - paramsType: []; - returnType: void; - }; - /** - * Returns a document snapshot, including the full DOM tree of the root node (including iframes, - * template contents, and imported documents) in a flattened array, as well as layout and - * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is - * flattened. - */ - "DOMSnapshot.getSnapshot": { - paramsType: [Protocol.DOMSnapshot.GetSnapshotRequest]; - returnType: Protocol.DOMSnapshot.GetSnapshotResponse; - }; - /** - * Returns a document snapshot, including the full DOM tree of the root node (including iframes, - * template contents, and imported documents) in a flattened array, as well as layout and - * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is - * flattened. - */ - "DOMSnapshot.captureSnapshot": { - paramsType: [Protocol.DOMSnapshot.CaptureSnapshotRequest]; - returnType: Protocol.DOMSnapshot.CaptureSnapshotResponse; - }; - "DOMStorage.clear": { - paramsType: [Protocol.DOMStorage.ClearRequest]; - returnType: void; - }; - /** - * Disables storage tracking, prevents storage events from being sent to the client. - */ - "DOMStorage.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables storage tracking, storage events will now be delivered to the client. - */ - "DOMStorage.enable": { - paramsType: []; - returnType: void; - }; - "DOMStorage.getDOMStorageItems": { - paramsType: [Protocol.DOMStorage.GetDOMStorageItemsRequest]; - returnType: Protocol.DOMStorage.GetDOMStorageItemsResponse; - }; - "DOMStorage.removeDOMStorageItem": { - paramsType: [Protocol.DOMStorage.RemoveDOMStorageItemRequest]; - returnType: void; - }; - "DOMStorage.setDOMStorageItem": { - paramsType: [Protocol.DOMStorage.SetDOMStorageItemRequest]; - returnType: void; - }; - /** - * Disables database tracking, prevents database events from being sent to the client. - */ - "Database.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables database tracking, database events will now be delivered to the client. - */ - "Database.enable": { - paramsType: []; - returnType: void; - }; - "Database.executeSQL": { - paramsType: [Protocol.Database.ExecuteSQLRequest]; - returnType: Protocol.Database.ExecuteSQLResponse; - }; - "Database.getDatabaseTableNames": { - paramsType: [Protocol.Database.GetDatabaseTableNamesRequest]; - returnType: Protocol.Database.GetDatabaseTableNamesResponse; - }; - /** - * Clears the overridden Device Orientation. - */ - "DeviceOrientation.clearDeviceOrientationOverride": { - paramsType: []; - returnType: void; - }; - /** - * Overrides the Device Orientation. - */ - "DeviceOrientation.setDeviceOrientationOverride": { - paramsType: [ - Protocol.DeviceOrientation.SetDeviceOrientationOverrideRequest, - ]; - returnType: void; - }; - /** - * Tells whether emulation is supported. - */ - "Emulation.canEmulate": { - paramsType: []; - returnType: Protocol.Emulation.CanEmulateResponse; - }; - /** - * Clears the overriden device metrics. - */ - "Emulation.clearDeviceMetricsOverride": { - paramsType: []; - returnType: void; - }; - /** - * Clears the overriden Geolocation Position and Error. - */ - "Emulation.clearGeolocationOverride": { - paramsType: []; - returnType: void; - }; - /** - * Requests that page scale factor is reset to initial values. - */ - "Emulation.resetPageScaleFactor": { - paramsType: []; - returnType: void; - }; - /** - * Enables or disables simulating a focused and active page. - */ - "Emulation.setFocusEmulationEnabled": { - paramsType: [Protocol.Emulation.SetFocusEmulationEnabledRequest]; - returnType: void; - }; - /** - * Enables CPU throttling to emulate slow CPUs. - */ - "Emulation.setCPUThrottlingRate": { - paramsType: [Protocol.Emulation.SetCPUThrottlingRateRequest]; - returnType: void; - }; - /** - * Sets or clears an override of the default background color of the frame. This override is used - * if the content does not specify one. - */ - "Emulation.setDefaultBackgroundColorOverride": { - paramsType: [ - Protocol.Emulation.SetDefaultBackgroundColorOverrideRequest?, - ]; - returnType: void; - }; - /** - * Overrides the values of device screen dimensions (window.screen.width, window.screen.height, - * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media - * query results). - */ - "Emulation.setDeviceMetricsOverride": { - paramsType: [Protocol.Emulation.SetDeviceMetricsOverrideRequest]; - returnType: void; - }; - "Emulation.setScrollbarsHidden": { - paramsType: [Protocol.Emulation.SetScrollbarsHiddenRequest]; - returnType: void; - }; - "Emulation.setDocumentCookieDisabled": { - paramsType: [Protocol.Emulation.SetDocumentCookieDisabledRequest]; - returnType: void; - }; - "Emulation.setEmitTouchEventsForMouse": { - paramsType: [Protocol.Emulation.SetEmitTouchEventsForMouseRequest]; - returnType: void; - }; - /** - * Emulates the given media type or media feature for CSS media queries. - */ - "Emulation.setEmulatedMedia": { - paramsType: [Protocol.Emulation.SetEmulatedMediaRequest?]; - returnType: void; - }; - /** - * Emulates the given vision deficiency. - */ - "Emulation.setEmulatedVisionDeficiency": { - paramsType: [Protocol.Emulation.SetEmulatedVisionDeficiencyRequest]; - returnType: void; - }; - /** - * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position - * unavailable. - */ - "Emulation.setGeolocationOverride": { - paramsType: [Protocol.Emulation.SetGeolocationOverrideRequest?]; - returnType: void; - }; - /** - * Overrides the Idle state. - */ - "Emulation.setIdleOverride": { - paramsType: [Protocol.Emulation.SetIdleOverrideRequest]; - returnType: void; - }; - /** - * Clears Idle state overrides. - */ - "Emulation.clearIdleOverride": { - paramsType: []; - returnType: void; - }; - /** - * Overrides value returned by the javascript navigator object. - */ - "Emulation.setNavigatorOverrides": { - paramsType: [Protocol.Emulation.SetNavigatorOverridesRequest]; - returnType: void; - }; - /** - * Sets a specified page scale factor. - */ - "Emulation.setPageScaleFactor": { - paramsType: [Protocol.Emulation.SetPageScaleFactorRequest]; - returnType: void; - }; - /** - * Switches script execution in the page. - */ - "Emulation.setScriptExecutionDisabled": { - paramsType: [Protocol.Emulation.SetScriptExecutionDisabledRequest]; - returnType: void; - }; - /** - * Enables touch on platforms which do not support them. - */ - "Emulation.setTouchEmulationEnabled": { - paramsType: [Protocol.Emulation.SetTouchEmulationEnabledRequest]; - returnType: void; - }; - /** - * Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets - * the current virtual time policy. Note this supersedes any previous time budget. - */ - "Emulation.setVirtualTimePolicy": { - paramsType: [Protocol.Emulation.SetVirtualTimePolicyRequest]; - returnType: Protocol.Emulation.SetVirtualTimePolicyResponse; - }; - /** - * Overrides default host system locale with the specified one. - */ - "Emulation.setLocaleOverride": { - paramsType: [Protocol.Emulation.SetLocaleOverrideRequest?]; - returnType: void; - }; - /** - * Overrides default host system timezone with the specified one. - */ - "Emulation.setTimezoneOverride": { - paramsType: [Protocol.Emulation.SetTimezoneOverrideRequest]; - returnType: void; - }; - /** - * Resizes the frame/viewport of the page. Note that this does not affect the frame's container - * (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported - * on Android. - */ - "Emulation.setVisibleSize": { - paramsType: [Protocol.Emulation.SetVisibleSizeRequest]; - returnType: void; - }; - /** - * Allows overriding user agent with the given string. - */ - "Emulation.setUserAgentOverride": { - paramsType: [Protocol.Emulation.SetUserAgentOverrideRequest]; - returnType: void; - }; - /** - * Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a - * screenshot from the resulting frame. Requires that the target was created with enabled - * BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also - * https://goo.gl/3zHXhB for more background. - */ - "HeadlessExperimental.beginFrame": { - paramsType: [Protocol.HeadlessExperimental.BeginFrameRequest?]; - returnType: Protocol.HeadlessExperimental.BeginFrameResponse; - }; - /** - * Disables headless events for the target. - */ - "HeadlessExperimental.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables headless events for the target. - */ - "HeadlessExperimental.enable": { - paramsType: []; - returnType: void; - }; - /** - * Close the stream, discard any temporary backing storage. - */ - "IO.close": { - paramsType: [Protocol.IO.CloseRequest]; - returnType: void; - }; - /** - * Read a chunk of the stream - */ - "IO.read": { - paramsType: [Protocol.IO.ReadRequest]; - returnType: Protocol.IO.ReadResponse; - }; - /** - * Return UUID of Blob object specified by a remote object id. - */ - "IO.resolveBlob": { - paramsType: [Protocol.IO.ResolveBlobRequest]; - returnType: Protocol.IO.ResolveBlobResponse; - }; - /** - * Clears all entries from an object store. - */ - "IndexedDB.clearObjectStore": { - paramsType: [Protocol.IndexedDB.ClearObjectStoreRequest]; - returnType: void; - }; - /** - * Deletes a database. - */ - "IndexedDB.deleteDatabase": { - paramsType: [Protocol.IndexedDB.DeleteDatabaseRequest]; - returnType: void; - }; - /** - * Delete a range of entries from an object store - */ - "IndexedDB.deleteObjectStoreEntries": { - paramsType: [Protocol.IndexedDB.DeleteObjectStoreEntriesRequest]; - returnType: void; - }; - /** - * Disables events from backend. - */ - "IndexedDB.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables events from backend. - */ - "IndexedDB.enable": { - paramsType: []; - returnType: void; - }; - /** - * Requests data from object store or index. - */ - "IndexedDB.requestData": { - paramsType: [Protocol.IndexedDB.RequestDataRequest]; - returnType: Protocol.IndexedDB.RequestDataResponse; - }; - /** - * Gets metadata of an object store - */ - "IndexedDB.getMetadata": { - paramsType: [Protocol.IndexedDB.GetMetadataRequest]; - returnType: Protocol.IndexedDB.GetMetadataResponse; - }; - /** - * Requests database with given name in given frame. - */ - "IndexedDB.requestDatabase": { - paramsType: [Protocol.IndexedDB.RequestDatabaseRequest]; - returnType: Protocol.IndexedDB.RequestDatabaseResponse; - }; - /** - * Requests database names for given security origin. - */ - "IndexedDB.requestDatabaseNames": { - paramsType: [Protocol.IndexedDB.RequestDatabaseNamesRequest]; - returnType: Protocol.IndexedDB.RequestDatabaseNamesResponse; - }; - /** - * Dispatches a key event to the page. - */ - "Input.dispatchKeyEvent": { - paramsType: [Protocol.Input.DispatchKeyEventRequest]; - returnType: void; - }; - /** - * This method emulates inserting text that doesn't come from a key press, - * for example an emoji keyboard or an IME. - */ - "Input.insertText": { - paramsType: [Protocol.Input.InsertTextRequest]; - returnType: void; - }; - /** - * Dispatches a mouse event to the page. - */ - "Input.dispatchMouseEvent": { - paramsType: [Protocol.Input.DispatchMouseEventRequest]; - returnType: void; - }; - /** - * Dispatches a touch event to the page. - */ - "Input.dispatchTouchEvent": { - paramsType: [Protocol.Input.DispatchTouchEventRequest]; - returnType: void; - }; - /** - * Emulates touch event from the mouse event parameters. - */ - "Input.emulateTouchFromMouseEvent": { - paramsType: [Protocol.Input.EmulateTouchFromMouseEventRequest]; - returnType: void; - }; - /** - * Ignores input events (useful while auditing page). - */ - "Input.setIgnoreInputEvents": { - paramsType: [Protocol.Input.SetIgnoreInputEventsRequest]; - returnType: void; - }; - /** - * Synthesizes a pinch gesture over a time period by issuing appropriate touch events. - */ - "Input.synthesizePinchGesture": { - paramsType: [Protocol.Input.SynthesizePinchGestureRequest]; - returnType: void; - }; - /** - * Synthesizes a scroll gesture over a time period by issuing appropriate touch events. - */ - "Input.synthesizeScrollGesture": { - paramsType: [Protocol.Input.SynthesizeScrollGestureRequest]; - returnType: void; - }; - /** - * Synthesizes a tap gesture over a time period by issuing appropriate touch events. - */ - "Input.synthesizeTapGesture": { - paramsType: [Protocol.Input.SynthesizeTapGestureRequest]; - returnType: void; - }; - /** - * Disables inspector domain notifications. - */ - "Inspector.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables inspector domain notifications. - */ - "Inspector.enable": { - paramsType: []; - returnType: void; - }; - /** - * Provides the reasons why the given layer was composited. - */ - "LayerTree.compositingReasons": { - paramsType: [Protocol.LayerTree.CompositingReasonsRequest]; - returnType: Protocol.LayerTree.CompositingReasonsResponse; - }; - /** - * Disables compositing tree inspection. - */ - "LayerTree.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables compositing tree inspection. - */ - "LayerTree.enable": { - paramsType: []; - returnType: void; - }; - /** - * Returns the snapshot identifier. - */ - "LayerTree.loadSnapshot": { - paramsType: [Protocol.LayerTree.LoadSnapshotRequest]; - returnType: Protocol.LayerTree.LoadSnapshotResponse; - }; - /** - * Returns the layer snapshot identifier. - */ - "LayerTree.makeSnapshot": { - paramsType: [Protocol.LayerTree.MakeSnapshotRequest]; - returnType: Protocol.LayerTree.MakeSnapshotResponse; - }; - "LayerTree.profileSnapshot": { - paramsType: [Protocol.LayerTree.ProfileSnapshotRequest]; - returnType: Protocol.LayerTree.ProfileSnapshotResponse; - }; - /** - * Releases layer snapshot captured by the back-end. - */ - "LayerTree.releaseSnapshot": { - paramsType: [Protocol.LayerTree.ReleaseSnapshotRequest]; - returnType: void; - }; - /** - * Replays the layer snapshot and returns the resulting bitmap. - */ - "LayerTree.replaySnapshot": { - paramsType: [Protocol.LayerTree.ReplaySnapshotRequest]; - returnType: Protocol.LayerTree.ReplaySnapshotResponse; - }; - /** - * Replays the layer snapshot and returns canvas log. - */ - "LayerTree.snapshotCommandLog": { - paramsType: [Protocol.LayerTree.SnapshotCommandLogRequest]; - returnType: Protocol.LayerTree.SnapshotCommandLogResponse; - }; - /** - * Clears the log. - */ - "Log.clear": { - paramsType: []; - returnType: void; - }; - /** - * Disables log domain, prevents further log entries from being reported to the client. - */ - "Log.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables log domain, sends the entries collected so far to the client by means of the - * `entryAdded` notification. - */ - "Log.enable": { - paramsType: []; - returnType: void; - }; - /** - * start violation reporting. - */ - "Log.startViolationsReport": { - paramsType: [Protocol.Log.StartViolationsReportRequest]; - returnType: void; - }; - /** - * Stop violation reporting. - */ - "Log.stopViolationsReport": { - paramsType: []; - returnType: void; - }; - "Memory.getDOMCounters": { - paramsType: []; - returnType: Protocol.Memory.GetDOMCountersResponse; - }; - "Memory.prepareForLeakDetection": { - paramsType: []; - returnType: void; - }; - /** - * Simulate OomIntervention by purging V8 memory. - */ - "Memory.forciblyPurgeJavaScriptMemory": { - paramsType: []; - returnType: void; - }; - /** - * Enable/disable suppressing memory pressure notifications in all processes. - */ - "Memory.setPressureNotificationsSuppressed": { - paramsType: [Protocol.Memory.SetPressureNotificationsSuppressedRequest]; - returnType: void; - }; - /** - * Simulate a memory pressure notification in all processes. - */ - "Memory.simulatePressureNotification": { - paramsType: [Protocol.Memory.SimulatePressureNotificationRequest]; - returnType: void; - }; - /** - * Start collecting native memory profile. - */ - "Memory.startSampling": { - paramsType: [Protocol.Memory.StartSamplingRequest?]; - returnType: void; - }; - /** - * Stop collecting native memory profile. - */ - "Memory.stopSampling": { - paramsType: []; - returnType: void; - }; - /** - * Retrieve native memory allocations profile - * collected since renderer process startup. - */ - "Memory.getAllTimeSamplingProfile": { - paramsType: []; - returnType: Protocol.Memory.GetAllTimeSamplingProfileResponse; - }; - /** - * Retrieve native memory allocations profile - * collected since browser process startup. - */ - "Memory.getBrowserSamplingProfile": { - paramsType: []; - returnType: Protocol.Memory.GetBrowserSamplingProfileResponse; - }; - /** - * Retrieve native memory allocations profile collected since last - * `startSampling` call. - */ - "Memory.getSamplingProfile": { - paramsType: []; - returnType: Protocol.Memory.GetSamplingProfileResponse; - }; - /** - * Tells whether clearing browser cache is supported. - */ - "Network.canClearBrowserCache": { - paramsType: []; - returnType: Protocol.Network.CanClearBrowserCacheResponse; - }; - /** - * Tells whether clearing browser cookies is supported. - */ - "Network.canClearBrowserCookies": { - paramsType: []; - returnType: Protocol.Network.CanClearBrowserCookiesResponse; - }; - /** - * Tells whether emulation of network conditions is supported. - */ - "Network.canEmulateNetworkConditions": { - paramsType: []; - returnType: Protocol.Network.CanEmulateNetworkConditionsResponse; - }; - /** - * Clears browser cache. - */ - "Network.clearBrowserCache": { - paramsType: []; - returnType: void; - }; - /** - * Clears browser cookies. - */ - "Network.clearBrowserCookies": { - paramsType: []; - returnType: void; - }; - /** - * Response to Network.requestIntercepted which either modifies the request to continue with any - * modifications, or blocks it, or completes it with the provided response bytes. If a network - * fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted - * event will be sent with the same InterceptionId. - * Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead. - */ - "Network.continueInterceptedRequest": { - paramsType: [Protocol.Network.ContinueInterceptedRequestRequest]; - returnType: void; - }; - /** - * Deletes browser cookies with matching name and url or domain/path pair. - */ - "Network.deleteCookies": { - paramsType: [Protocol.Network.DeleteCookiesRequest]; - returnType: void; - }; - /** - * Disables network tracking, prevents network events from being sent to the client. - */ - "Network.disable": { - paramsType: []; - returnType: void; - }; - /** - * Activates emulation of network conditions. - */ - "Network.emulateNetworkConditions": { - paramsType: [Protocol.Network.EmulateNetworkConditionsRequest]; - returnType: void; - }; - /** - * Enables network tracking, network events will now be delivered to the client. - */ - "Network.enable": { - paramsType: [Protocol.Network.EnableRequest?]; - returnType: void; - }; - /** - * Returns all browser cookies. Depending on the backend support, will return detailed cookie - * information in the `cookies` field. - */ - "Network.getAllCookies": { - paramsType: []; - returnType: Protocol.Network.GetAllCookiesResponse; - }; - /** - * Returns the DER-encoded certificate. - */ - "Network.getCertificate": { - paramsType: [Protocol.Network.GetCertificateRequest]; - returnType: Protocol.Network.GetCertificateResponse; - }; - /** - * Returns all browser cookies for the current URL. Depending on the backend support, will return - * detailed cookie information in the `cookies` field. - */ - "Network.getCookies": { - paramsType: [Protocol.Network.GetCookiesRequest?]; - returnType: Protocol.Network.GetCookiesResponse; - }; - /** - * Returns content served for the given request. - */ - "Network.getResponseBody": { - paramsType: [Protocol.Network.GetResponseBodyRequest]; - returnType: Protocol.Network.GetResponseBodyResponse; - }; - /** - * Returns post data sent with the request. Returns an error when no data was sent with the request. - */ - "Network.getRequestPostData": { - paramsType: [Protocol.Network.GetRequestPostDataRequest]; - returnType: Protocol.Network.GetRequestPostDataResponse; - }; - /** - * Returns content served for the given currently intercepted request. - */ - "Network.getResponseBodyForInterception": { - paramsType: [Protocol.Network.GetResponseBodyForInterceptionRequest]; - returnType: Protocol.Network.GetResponseBodyForInterceptionResponse; - }; - /** - * Returns a handle to the stream representing the response body. Note that after this command, - * the intercepted request can't be continued as is -- you either need to cancel it or to provide - * the response body. The stream only supports sequential read, IO.read will fail if the position - * is specified. - */ - "Network.takeResponseBodyForInterceptionAsStream": { - paramsType: [ - Protocol.Network.TakeResponseBodyForInterceptionAsStreamRequest, - ]; - returnType: - Protocol.Network.TakeResponseBodyForInterceptionAsStreamResponse; - }; - /** - * This method sends a new XMLHttpRequest which is identical to the original one. The following - * parameters should be identical: method, url, async, request body, extra headers, withCredentials - * attribute, user, password. - */ - "Network.replayXHR": { - paramsType: [Protocol.Network.ReplayXHRRequest]; - returnType: void; - }; - /** - * Searches for given string in response content. - */ - "Network.searchInResponseBody": { - paramsType: [Protocol.Network.SearchInResponseBodyRequest]; - returnType: Protocol.Network.SearchInResponseBodyResponse; - }; - /** - * Blocks URLs from loading. - */ - "Network.setBlockedURLs": { - paramsType: [Protocol.Network.SetBlockedURLsRequest]; - returnType: void; - }; - /** - * Toggles ignoring of service worker for each request. - */ - "Network.setBypassServiceWorker": { - paramsType: [Protocol.Network.SetBypassServiceWorkerRequest]; - returnType: void; - }; - /** - * Toggles ignoring cache for each request. If `true`, cache will not be used. - */ - "Network.setCacheDisabled": { - paramsType: [Protocol.Network.SetCacheDisabledRequest]; - returnType: void; - }; - /** - * Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. - */ - "Network.setCookie": { - paramsType: [Protocol.Network.SetCookieRequest]; - returnType: Protocol.Network.SetCookieResponse; - }; - /** - * Sets given cookies. - */ - "Network.setCookies": { - paramsType: [Protocol.Network.SetCookiesRequest]; - returnType: void; - }; - /** - * For testing. - */ - "Network.setDataSizeLimitsForTest": { - paramsType: [Protocol.Network.SetDataSizeLimitsForTestRequest]; - returnType: void; - }; - /** - * Specifies whether to always send extra HTTP headers with the requests from this page. - */ - "Network.setExtraHTTPHeaders": { - paramsType: [Protocol.Network.SetExtraHTTPHeadersRequest]; - returnType: void; - }; - /** - * Specifies whether to sned a debug header to all outgoing requests. - */ - "Network.setAttachDebugHeader": { - paramsType: [Protocol.Network.SetAttachDebugHeaderRequest]; - returnType: void; - }; - /** - * Sets the requests to intercept that match the provided patterns and optionally resource types. - * Deprecated, please use Fetch.enable instead. - */ - "Network.setRequestInterception": { - paramsType: [Protocol.Network.SetRequestInterceptionRequest]; - returnType: void; - }; - /** - * Allows overriding user agent with the given string. - */ - "Network.setUserAgentOverride": { - paramsType: [Protocol.Network.SetUserAgentOverrideRequest]; - returnType: void; - }; - /** - * Returns information about the COEP/COOP isolation status. - */ - "Network.getSecurityIsolationStatus": { - paramsType: [Protocol.Network.GetSecurityIsolationStatusRequest?]; - returnType: Protocol.Network.GetSecurityIsolationStatusResponse; - }; - /** - * Fetches the resource and returns the content. - */ - "Network.loadNetworkResource": { - paramsType: [Protocol.Network.LoadNetworkResourceRequest]; - returnType: Protocol.Network.LoadNetworkResourceResponse; - }; - /** - * Disables domain notifications. - */ - "Overlay.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables domain notifications. - */ - "Overlay.enable": { - paramsType: []; - returnType: void; - }; - /** - * For testing. - */ - "Overlay.getHighlightObjectForTest": { - paramsType: [Protocol.Overlay.GetHighlightObjectForTestRequest]; - returnType: Protocol.Overlay.GetHighlightObjectForTestResponse; - }; - /** - * For Persistent Grid testing. - */ - "Overlay.getGridHighlightObjectsForTest": { - paramsType: [Protocol.Overlay.GetGridHighlightObjectsForTestRequest]; - returnType: Protocol.Overlay.GetGridHighlightObjectsForTestResponse; - }; - /** - * For Source Order Viewer testing. - */ - "Overlay.getSourceOrderHighlightObjectForTest": { - paramsType: [ - Protocol.Overlay.GetSourceOrderHighlightObjectForTestRequest, - ]; - returnType: Protocol.Overlay.GetSourceOrderHighlightObjectForTestResponse; - }; - /** - * Hides any highlight. - */ - "Overlay.hideHighlight": { - paramsType: []; - returnType: void; - }; - /** - * Highlights owner element of the frame with given id. - */ - "Overlay.highlightFrame": { - paramsType: [Protocol.Overlay.HighlightFrameRequest]; - returnType: void; - }; - /** - * Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or - * objectId must be specified. - */ - "Overlay.highlightNode": { - paramsType: [Protocol.Overlay.HighlightNodeRequest]; - returnType: void; - }; - /** - * Highlights given quad. Coordinates are absolute with respect to the main frame viewport. - */ - "Overlay.highlightQuad": { - paramsType: [Protocol.Overlay.HighlightQuadRequest]; - returnType: void; - }; - /** - * Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. - */ - "Overlay.highlightRect": { - paramsType: [Protocol.Overlay.HighlightRectRequest]; - returnType: void; - }; - /** - * Highlights the source order of the children of the DOM node with given id or with the given - * JavaScript object wrapper. Either nodeId or objectId must be specified. - */ - "Overlay.highlightSourceOrder": { - paramsType: [Protocol.Overlay.HighlightSourceOrderRequest]; - returnType: void; - }; - /** - * Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. - * Backend then generates 'inspectNodeRequested' event upon element selection. - */ - "Overlay.setInspectMode": { - paramsType: [Protocol.Overlay.SetInspectModeRequest]; - returnType: void; - }; - /** - * Highlights owner element of all frames detected to be ads. - */ - "Overlay.setShowAdHighlights": { - paramsType: [Protocol.Overlay.SetShowAdHighlightsRequest]; - returnType: void; - }; - "Overlay.setPausedInDebuggerMessage": { - paramsType: [Protocol.Overlay.SetPausedInDebuggerMessageRequest?]; - returnType: void; - }; - /** - * Requests that backend shows debug borders on layers - */ - "Overlay.setShowDebugBorders": { - paramsType: [Protocol.Overlay.SetShowDebugBordersRequest]; - returnType: void; - }; - /** - * Requests that backend shows the FPS counter - */ - "Overlay.setShowFPSCounter": { - paramsType: [Protocol.Overlay.SetShowFPSCounterRequest]; - returnType: void; - }; - /** - * Highlight multiple elements with the CSS Grid overlay. - */ - "Overlay.setShowGridOverlays": { - paramsType: [Protocol.Overlay.SetShowGridOverlaysRequest]; - returnType: void; - }; - /** - * Requests that backend shows paint rectangles - */ - "Overlay.setShowPaintRects": { - paramsType: [Protocol.Overlay.SetShowPaintRectsRequest]; - returnType: void; - }; - /** - * Requests that backend shows layout shift regions - */ - "Overlay.setShowLayoutShiftRegions": { - paramsType: [Protocol.Overlay.SetShowLayoutShiftRegionsRequest]; - returnType: void; - }; - /** - * Requests that backend shows scroll bottleneck rects - */ - "Overlay.setShowScrollBottleneckRects": { - paramsType: [Protocol.Overlay.SetShowScrollBottleneckRectsRequest]; - returnType: void; - }; - /** - * Requests that backend shows hit-test borders on layers - */ - "Overlay.setShowHitTestBorders": { - paramsType: [Protocol.Overlay.SetShowHitTestBordersRequest]; - returnType: void; - }; - /** - * Paints viewport size upon main frame resize. - */ - "Overlay.setShowViewportSizeOnResize": { - paramsType: [Protocol.Overlay.SetShowViewportSizeOnResizeRequest]; - returnType: void; - }; - /** - * Add a dual screen device hinge - */ - "Overlay.setShowHinge": { - paramsType: [Protocol.Overlay.SetShowHingeRequest?]; - returnType: void; - }; - /** - * Deprecated, please use addScriptToEvaluateOnNewDocument instead. - */ - "Page.addScriptToEvaluateOnLoad": { - paramsType: [Protocol.Page.AddScriptToEvaluateOnLoadRequest]; - returnType: Protocol.Page.AddScriptToEvaluateOnLoadResponse; - }; - /** - * Evaluates given script in every frame upon creation (before loading frame's scripts). - */ - "Page.addScriptToEvaluateOnNewDocument": { - paramsType: [Protocol.Page.AddScriptToEvaluateOnNewDocumentRequest]; - returnType: Protocol.Page.AddScriptToEvaluateOnNewDocumentResponse; - }; - /** - * Brings page to front (activates tab). - */ - "Page.bringToFront": { - paramsType: []; - returnType: void; - }; - /** - * Capture page screenshot. - */ - "Page.captureScreenshot": { - paramsType: [Protocol.Page.CaptureScreenshotRequest?]; - returnType: Protocol.Page.CaptureScreenshotResponse; - }; - /** - * Returns a snapshot of the page as a string. For MHTML format, the serialization includes - * iframes, shadow DOM, external resources, and element-inline styles. - */ - "Page.captureSnapshot": { - paramsType: [Protocol.Page.CaptureSnapshotRequest?]; - returnType: Protocol.Page.CaptureSnapshotResponse; - }; - /** - * Clears the overriden device metrics. - */ - "Page.clearDeviceMetricsOverride": { - paramsType: []; - returnType: void; - }; - /** - * Clears the overridden Device Orientation. - */ - "Page.clearDeviceOrientationOverride": { - paramsType: []; - returnType: void; - }; - /** - * Clears the overriden Geolocation Position and Error. - */ - "Page.clearGeolocationOverride": { - paramsType: []; - returnType: void; - }; - /** - * Creates an isolated world for the given frame. - */ - "Page.createIsolatedWorld": { - paramsType: [Protocol.Page.CreateIsolatedWorldRequest]; - returnType: Protocol.Page.CreateIsolatedWorldResponse; - }; - /** - * Deletes browser cookie with given name, domain and path. - */ - "Page.deleteCookie": { - paramsType: [Protocol.Page.DeleteCookieRequest]; - returnType: void; - }; - /** - * Disables page domain notifications. - */ - "Page.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables page domain notifications. - */ - "Page.enable": { - paramsType: []; - returnType: void; - }; - "Page.getAppManifest": { - paramsType: []; - returnType: Protocol.Page.GetAppManifestResponse; - }; - "Page.getInstallabilityErrors": { - paramsType: []; - returnType: Protocol.Page.GetInstallabilityErrorsResponse; - }; - "Page.getManifestIcons": { - paramsType: []; - returnType: Protocol.Page.GetManifestIconsResponse; - }; - /** - * Returns all browser cookies. Depending on the backend support, will return detailed cookie - * information in the `cookies` field. - */ - "Page.getCookies": { - paramsType: []; - returnType: Protocol.Page.GetCookiesResponse; - }; - /** - * Returns present frame tree structure. - */ - "Page.getFrameTree": { - paramsType: []; - returnType: Protocol.Page.GetFrameTreeResponse; - }; - /** - * Returns metrics relating to the layouting of the page, such as viewport bounds/scale. - */ - "Page.getLayoutMetrics": { - paramsType: []; - returnType: Protocol.Page.GetLayoutMetricsResponse; - }; - /** - * Returns navigation history for the current page. - */ - "Page.getNavigationHistory": { - paramsType: []; - returnType: Protocol.Page.GetNavigationHistoryResponse; - }; - /** - * Resets navigation history for the current page. - */ - "Page.resetNavigationHistory": { - paramsType: []; - returnType: void; - }; - /** - * Returns content of the given resource. - */ - "Page.getResourceContent": { - paramsType: [Protocol.Page.GetResourceContentRequest]; - returnType: Protocol.Page.GetResourceContentResponse; - }; - /** - * Returns present frame / resource tree structure. - */ - "Page.getResourceTree": { - paramsType: []; - returnType: Protocol.Page.GetResourceTreeResponse; - }; - /** - * Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). - */ - "Page.handleJavaScriptDialog": { - paramsType: [Protocol.Page.HandleJavaScriptDialogRequest]; - returnType: void; - }; - /** - * Navigates current page to the given URL. - */ - "Page.navigate": { - paramsType: [Protocol.Page.NavigateRequest]; - returnType: Protocol.Page.NavigateResponse; - }; - /** - * Navigates current page to the given history entry. - */ - "Page.navigateToHistoryEntry": { - paramsType: [Protocol.Page.NavigateToHistoryEntryRequest]; - returnType: void; - }; - /** - * Print page as PDF. - */ - "Page.printToPDF": { - paramsType: [Protocol.Page.PrintToPDFRequest?]; - returnType: Protocol.Page.PrintToPDFResponse; - }; - /** - * Reloads given page optionally ignoring the cache. - */ - "Page.reload": { - paramsType: [Protocol.Page.ReloadRequest?]; - returnType: void; - }; - /** - * Deprecated, please use removeScriptToEvaluateOnNewDocument instead. - */ - "Page.removeScriptToEvaluateOnLoad": { - paramsType: [Protocol.Page.RemoveScriptToEvaluateOnLoadRequest]; - returnType: void; - }; - /** - * Removes given script from the list. - */ - "Page.removeScriptToEvaluateOnNewDocument": { - paramsType: [Protocol.Page.RemoveScriptToEvaluateOnNewDocumentRequest]; - returnType: void; - }; - /** - * Acknowledges that a screencast frame has been received by the frontend. - */ - "Page.screencastFrameAck": { - paramsType: [Protocol.Page.ScreencastFrameAckRequest]; - returnType: void; - }; - /** - * Searches for given string in resource content. - */ - "Page.searchInResource": { - paramsType: [Protocol.Page.SearchInResourceRequest]; - returnType: Protocol.Page.SearchInResourceResponse; - }; - /** - * Enable Chrome's experimental ad filter on all sites. - */ - "Page.setAdBlockingEnabled": { - paramsType: [Protocol.Page.SetAdBlockingEnabledRequest]; - returnType: void; - }; - /** - * Enable page Content Security Policy by-passing. - */ - "Page.setBypassCSP": { - paramsType: [Protocol.Page.SetBypassCSPRequest]; - returnType: void; - }; - /** - * Overrides the values of device screen dimensions (window.screen.width, window.screen.height, - * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media - * query results). - */ - "Page.setDeviceMetricsOverride": { - paramsType: [Protocol.Page.SetDeviceMetricsOverrideRequest]; - returnType: void; - }; - /** - * Overrides the Device Orientation. - */ - "Page.setDeviceOrientationOverride": { - paramsType: [Protocol.Page.SetDeviceOrientationOverrideRequest]; - returnType: void; - }; - /** - * Set generic font families. - */ - "Page.setFontFamilies": { - paramsType: [Protocol.Page.SetFontFamiliesRequest]; - returnType: void; - }; - /** - * Set default font sizes. - */ - "Page.setFontSizes": { - paramsType: [Protocol.Page.SetFontSizesRequest]; - returnType: void; - }; - /** - * Sets given markup as the document's HTML. - */ - "Page.setDocumentContent": { - paramsType: [Protocol.Page.SetDocumentContentRequest]; - returnType: void; - }; - /** - * Set the behavior when downloading a file. - */ - "Page.setDownloadBehavior": { - paramsType: [Protocol.Page.SetDownloadBehaviorRequest]; - returnType: void; - }; - /** - * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position - * unavailable. - */ - "Page.setGeolocationOverride": { - paramsType: [Protocol.Page.SetGeolocationOverrideRequest?]; - returnType: void; - }; - /** - * Controls whether page will emit lifecycle events. - */ - "Page.setLifecycleEventsEnabled": { - paramsType: [Protocol.Page.SetLifecycleEventsEnabledRequest]; - returnType: void; - }; - /** - * Toggles mouse event-based touch event emulation. - */ - "Page.setTouchEmulationEnabled": { - paramsType: [Protocol.Page.SetTouchEmulationEnabledRequest]; - returnType: void; - }; - /** - * Starts sending each frame using the `screencastFrame` event. - */ - "Page.startScreencast": { - paramsType: [Protocol.Page.StartScreencastRequest?]; - returnType: void; - }; - /** - * Force the page stop all navigations and pending resource fetches. - */ - "Page.stopLoading": { - paramsType: []; - returnType: void; - }; - /** - * Crashes renderer on the IO thread, generates minidumps. - */ - "Page.crash": { - paramsType: []; - returnType: void; - }; - /** - * Tries to close page, running its beforeunload hooks, if any. - */ - "Page.close": { - paramsType: []; - returnType: void; - }; - /** - * Tries to update the web lifecycle state of the page. - * It will transition the page to the given state according to: - * https://github.com/WICG/web-lifecycle/ - */ - "Page.setWebLifecycleState": { - paramsType: [Protocol.Page.SetWebLifecycleStateRequest]; - returnType: void; - }; - /** - * Stops sending each frame in the `screencastFrame`. - */ - "Page.stopScreencast": { - paramsType: []; - returnType: void; - }; - /** - * Forces compilation cache to be generated for every subresource script. - */ - "Page.setProduceCompilationCache": { - paramsType: [Protocol.Page.SetProduceCompilationCacheRequest]; - returnType: void; - }; - /** - * Seeds compilation cache for given url. Compilation cache does not survive - * cross-process navigation. - */ - "Page.addCompilationCache": { - paramsType: [Protocol.Page.AddCompilationCacheRequest]; - returnType: void; - }; - /** - * Clears seeded compilation cache. - */ - "Page.clearCompilationCache": { - paramsType: []; - returnType: void; - }; - /** - * Generates a report for testing. - */ - "Page.generateTestReport": { - paramsType: [Protocol.Page.GenerateTestReportRequest]; - returnType: void; - }; - /** - * Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger. - */ - "Page.waitForDebugger": { - paramsType: []; - returnType: void; - }; - /** - * Intercept file chooser requests and transfer control to protocol clients. - * When file chooser interception is enabled, native file chooser dialog is not shown. - * Instead, a protocol event `Page.fileChooserOpened` is emitted. - */ - "Page.setInterceptFileChooserDialog": { - paramsType: [Protocol.Page.SetInterceptFileChooserDialogRequest]; - returnType: void; - }; - /** - * Disable collecting and reporting metrics. - */ - "Performance.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enable collecting and reporting metrics. - */ - "Performance.enable": { - paramsType: [Protocol.Performance.EnableRequest?]; - returnType: void; - }; - /** - * Sets time domain to use for collecting and reporting duration metrics. - * Note that this must be called before enabling metrics collection. Calling - * this method while metrics collection is enabled returns an error. - */ - "Performance.setTimeDomain": { - paramsType: [Protocol.Performance.SetTimeDomainRequest]; - returnType: void; - }; - /** - * Retrieve current values of run-time metrics. - */ - "Performance.getMetrics": { - paramsType: []; - returnType: Protocol.Performance.GetMetricsResponse; - }; - /** - * Disables tracking security state changes. - */ - "Security.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables tracking security state changes. - */ - "Security.enable": { - paramsType: []; - returnType: void; - }; - /** - * Enable/disable whether all certificate errors should be ignored. - */ - "Security.setIgnoreCertificateErrors": { - paramsType: [Protocol.Security.SetIgnoreCertificateErrorsRequest]; - returnType: void; - }; - /** - * Handles a certificate error that fired a certificateError event. - */ - "Security.handleCertificateError": { - paramsType: [Protocol.Security.HandleCertificateErrorRequest]; - returnType: void; - }; - /** - * Enable/disable overriding certificate errors. If enabled, all certificate error events need to - * be handled by the DevTools client and should be answered with `handleCertificateError` commands. - */ - "Security.setOverrideCertificateErrors": { - paramsType: [Protocol.Security.SetOverrideCertificateErrorsRequest]; - returnType: void; - }; - "ServiceWorker.deliverPushMessage": { - paramsType: [Protocol.ServiceWorker.DeliverPushMessageRequest]; - returnType: void; - }; - "ServiceWorker.disable": { - paramsType: []; - returnType: void; - }; - "ServiceWorker.dispatchSyncEvent": { - paramsType: [Protocol.ServiceWorker.DispatchSyncEventRequest]; - returnType: void; - }; - "ServiceWorker.dispatchPeriodicSyncEvent": { - paramsType: [Protocol.ServiceWorker.DispatchPeriodicSyncEventRequest]; - returnType: void; - }; - "ServiceWorker.enable": { - paramsType: []; - returnType: void; - }; - "ServiceWorker.inspectWorker": { - paramsType: [Protocol.ServiceWorker.InspectWorkerRequest]; - returnType: void; - }; - "ServiceWorker.setForceUpdateOnPageLoad": { - paramsType: [Protocol.ServiceWorker.SetForceUpdateOnPageLoadRequest]; - returnType: void; - }; - "ServiceWorker.skipWaiting": { - paramsType: [Protocol.ServiceWorker.SkipWaitingRequest]; - returnType: void; - }; - "ServiceWorker.startWorker": { - paramsType: [Protocol.ServiceWorker.StartWorkerRequest]; - returnType: void; - }; - "ServiceWorker.stopAllWorkers": { - paramsType: []; - returnType: void; - }; - "ServiceWorker.stopWorker": { - paramsType: [Protocol.ServiceWorker.StopWorkerRequest]; - returnType: void; - }; - "ServiceWorker.unregister": { - paramsType: [Protocol.ServiceWorker.UnregisterRequest]; - returnType: void; - }; - "ServiceWorker.updateRegistration": { - paramsType: [Protocol.ServiceWorker.UpdateRegistrationRequest]; - returnType: void; - }; - /** - * Clears storage for origin. - */ - "Storage.clearDataForOrigin": { - paramsType: [Protocol.Storage.ClearDataForOriginRequest]; - returnType: void; - }; - /** - * Returns all browser cookies. - */ - "Storage.getCookies": { - paramsType: [Protocol.Storage.GetCookiesRequest?]; - returnType: Protocol.Storage.GetCookiesResponse; - }; - /** - * Sets given cookies. - */ - "Storage.setCookies": { - paramsType: [Protocol.Storage.SetCookiesRequest]; - returnType: void; - }; - /** - * Clears cookies. - */ - "Storage.clearCookies": { - paramsType: [Protocol.Storage.ClearCookiesRequest?]; - returnType: void; - }; - /** - * Returns usage and quota in bytes. - */ - "Storage.getUsageAndQuota": { - paramsType: [Protocol.Storage.GetUsageAndQuotaRequest]; - returnType: Protocol.Storage.GetUsageAndQuotaResponse; - }; - /** - * Override quota for the specified origin - */ - "Storage.overrideQuotaForOrigin": { - paramsType: [Protocol.Storage.OverrideQuotaForOriginRequest]; - returnType: void; - }; - /** - * Registers origin to be notified when an update occurs to its cache storage list. - */ - "Storage.trackCacheStorageForOrigin": { - paramsType: [Protocol.Storage.TrackCacheStorageForOriginRequest]; - returnType: void; - }; - /** - * Registers origin to be notified when an update occurs to its IndexedDB. - */ - "Storage.trackIndexedDBForOrigin": { - paramsType: [Protocol.Storage.TrackIndexedDBForOriginRequest]; - returnType: void; - }; - /** - * Unregisters origin from receiving notifications for cache storage. - */ - "Storage.untrackCacheStorageForOrigin": { - paramsType: [Protocol.Storage.UntrackCacheStorageForOriginRequest]; - returnType: void; - }; - /** - * Unregisters origin from receiving notifications for IndexedDB. - */ - "Storage.untrackIndexedDBForOrigin": { - paramsType: [Protocol.Storage.UntrackIndexedDBForOriginRequest]; - returnType: void; - }; - /** - * Returns information about the system. - */ - "SystemInfo.getInfo": { - paramsType: []; - returnType: Protocol.SystemInfo.GetInfoResponse; - }; - /** - * Returns information about all running processes. - */ - "SystemInfo.getProcessInfo": { - paramsType: []; - returnType: Protocol.SystemInfo.GetProcessInfoResponse; - }; - /** - * Activates (focuses) the target. - */ - "Target.activateTarget": { - paramsType: [Protocol.Target.ActivateTargetRequest]; - returnType: void; - }; - /** - * Attaches to the target with given id. - */ - "Target.attachToTarget": { - paramsType: [Protocol.Target.AttachToTargetRequest]; - returnType: Protocol.Target.AttachToTargetResponse; - }; - /** - * Attaches to the browser target, only uses flat sessionId mode. - */ - "Target.attachToBrowserTarget": { - paramsType: []; - returnType: Protocol.Target.AttachToBrowserTargetResponse; - }; - /** - * Closes the target. If the target is a page that gets closed too. - */ - "Target.closeTarget": { - paramsType: [Protocol.Target.CloseTargetRequest]; - returnType: Protocol.Target.CloseTargetResponse; - }; - /** - * Inject object to the target's main frame that provides a communication - * channel with browser target. - * - * Injected object will be available as `window[bindingName]`. - * - * The object has the follwing API: - * - `binding.send(json)` - a method to send messages over the remote debugging protocol - * - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses. - */ - "Target.exposeDevToolsProtocol": { - paramsType: [Protocol.Target.ExposeDevToolsProtocolRequest]; - returnType: void; - }; - /** - * Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than - * one. - */ - "Target.createBrowserContext": { - paramsType: [Protocol.Target.CreateBrowserContextRequest?]; - returnType: Protocol.Target.CreateBrowserContextResponse; - }; - /** - * Returns all browser contexts created with `Target.createBrowserContext` method. - */ - "Target.getBrowserContexts": { - paramsType: []; - returnType: Protocol.Target.GetBrowserContextsResponse; - }; - /** - * Creates a new page. - */ - "Target.createTarget": { - paramsType: [Protocol.Target.CreateTargetRequest]; - returnType: Protocol.Target.CreateTargetResponse; - }; - /** - * Detaches session with given id. - */ - "Target.detachFromTarget": { - paramsType: [Protocol.Target.DetachFromTargetRequest?]; - returnType: void; - }; - /** - * Deletes a BrowserContext. All the belonging pages will be closed without calling their - * beforeunload hooks. - */ - "Target.disposeBrowserContext": { - paramsType: [Protocol.Target.DisposeBrowserContextRequest]; - returnType: void; - }; - /** - * Returns information about a target. - */ - "Target.getTargetInfo": { - paramsType: [Protocol.Target.GetTargetInfoRequest?]; - returnType: Protocol.Target.GetTargetInfoResponse; - }; - /** - * Retrieves a list of available targets. - */ - "Target.getTargets": { - paramsType: []; - returnType: Protocol.Target.GetTargetsResponse; - }; - /** - * Sends protocol message over session with given id. - * Consider using flat mode instead; see commands attachToTarget, setAutoAttach, - * and crbug.com/991325. - */ - "Target.sendMessageToTarget": { - paramsType: [Protocol.Target.SendMessageToTargetRequest]; - returnType: void; - }; - /** - * Controls whether to automatically attach to new targets which are considered to be related to - * this one. When turned on, attaches to all existing related targets as well. When turned off, - * automatically detaches from all currently attached targets. - */ - "Target.setAutoAttach": { - paramsType: [Protocol.Target.SetAutoAttachRequest]; - returnType: void; - }; - /** - * Controls whether to discover available targets and notify via - * `targetCreated/targetInfoChanged/targetDestroyed` events. - */ - "Target.setDiscoverTargets": { - paramsType: [Protocol.Target.SetDiscoverTargetsRequest]; - returnType: void; - }; - /** - * Enables target discovery for the specified locations, when `setDiscoverTargets` was set to - * `true`. - */ - "Target.setRemoteLocations": { - paramsType: [Protocol.Target.SetRemoteLocationsRequest]; - returnType: void; - }; - /** - * Request browser port binding. - */ - "Tethering.bind": { - paramsType: [Protocol.Tethering.BindRequest]; - returnType: void; - }; - /** - * Request browser port unbinding. - */ - "Tethering.unbind": { - paramsType: [Protocol.Tethering.UnbindRequest]; - returnType: void; - }; - /** - * Stop trace events collection. - */ - "Tracing.end": { - paramsType: []; - returnType: void; - }; - /** - * Gets supported tracing categories. - */ - "Tracing.getCategories": { - paramsType: []; - returnType: Protocol.Tracing.GetCategoriesResponse; - }; - /** - * Record a clock sync marker in the trace. - */ - "Tracing.recordClockSyncMarker": { - paramsType: [Protocol.Tracing.RecordClockSyncMarkerRequest]; - returnType: void; - }; - /** - * Request a global memory dump. - */ - "Tracing.requestMemoryDump": { - paramsType: [Protocol.Tracing.RequestMemoryDumpRequest?]; - returnType: Protocol.Tracing.RequestMemoryDumpResponse; - }; - /** - * Start trace events collection. - */ - "Tracing.start": { - paramsType: [Protocol.Tracing.StartRequest?]; - returnType: void; - }; - /** - * Disables the fetch domain. - */ - "Fetch.disable": { - paramsType: []; - returnType: void; - }; - /** - * Enables issuing of requestPaused events. A request will be paused until client - * calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth. - */ - "Fetch.enable": { - paramsType: [Protocol.Fetch.EnableRequest?]; - returnType: void; - }; - /** - * Causes the request to fail with specified reason. - */ - "Fetch.failRequest": { - paramsType: [Protocol.Fetch.FailRequestRequest]; - returnType: void; - }; - /** - * Provides response to the request. - */ - "Fetch.fulfillRequest": { - paramsType: [Protocol.Fetch.FulfillRequestRequest]; - returnType: void; - }; - /** - * Continues the request, optionally modifying some of its parameters. - */ - "Fetch.continueRequest": { - paramsType: [Protocol.Fetch.ContinueRequestRequest]; - returnType: void; - }; - /** - * Continues a request supplying authChallengeResponse following authRequired event. - */ - "Fetch.continueWithAuth": { - paramsType: [Protocol.Fetch.ContinueWithAuthRequest]; - returnType: void; - }; - /** - * Causes the body of the response to be received from the server and - * returned as a single string. May only be issued for a request that - * is paused in the Response stage and is mutually exclusive with - * takeResponseBodyForInterceptionAsStream. Calling other methods that - * affect the request or disabling fetch domain before body is received - * results in an undefined behavior. - */ - "Fetch.getResponseBody": { - paramsType: [Protocol.Fetch.GetResponseBodyRequest]; - returnType: Protocol.Fetch.GetResponseBodyResponse; - }; - /** - * Returns a handle to the stream representing the response body. - * The request must be paused in the HeadersReceived stage. - * Note that after this command the request can't be continued - * as is -- client either needs to cancel it or to provide the - * response body. - * The stream only supports sequential read, IO.read will fail if the position - * is specified. - * This method is mutually exclusive with getResponseBody. - * Calling other methods that affect the request or disabling fetch - * domain before body is received results in an undefined behavior. - */ - "Fetch.takeResponseBodyAsStream": { - paramsType: [Protocol.Fetch.TakeResponseBodyAsStreamRequest]; - returnType: Protocol.Fetch.TakeResponseBodyAsStreamResponse; - }; - /** - * Enables the WebAudio domain and starts sending context lifetime events. - */ - "WebAudio.enable": { - paramsType: []; - returnType: void; - }; - /** - * Disables the WebAudio domain. - */ - "WebAudio.disable": { - paramsType: []; - returnType: void; - }; - /** - * Fetch the realtime data from the registered contexts. - */ - "WebAudio.getRealtimeData": { - paramsType: [Protocol.WebAudio.GetRealtimeDataRequest]; - returnType: Protocol.WebAudio.GetRealtimeDataResponse; - }; - /** - * Enable the WebAuthn domain and start intercepting credential storage and - * retrieval with a virtual authenticator. - */ - "WebAuthn.enable": { - paramsType: []; - returnType: void; - }; - /** - * Disable the WebAuthn domain. - */ - "WebAuthn.disable": { - paramsType: []; - returnType: void; - }; - /** - * Creates and adds a virtual authenticator. - */ - "WebAuthn.addVirtualAuthenticator": { - paramsType: [Protocol.WebAuthn.AddVirtualAuthenticatorRequest]; - returnType: Protocol.WebAuthn.AddVirtualAuthenticatorResponse; - }; - /** - * Removes the given authenticator. - */ - "WebAuthn.removeVirtualAuthenticator": { - paramsType: [Protocol.WebAuthn.RemoveVirtualAuthenticatorRequest]; - returnType: void; - }; - /** - * Adds the credential to the specified authenticator. - */ - "WebAuthn.addCredential": { - paramsType: [Protocol.WebAuthn.AddCredentialRequest]; - returnType: void; - }; - /** - * Returns a single credential stored in the given virtual authenticator that - * matches the credential ID. - */ - "WebAuthn.getCredential": { - paramsType: [Protocol.WebAuthn.GetCredentialRequest]; - returnType: Protocol.WebAuthn.GetCredentialResponse; - }; - /** - * Returns all the credentials stored in the given virtual authenticator. - */ - "WebAuthn.getCredentials": { - paramsType: [Protocol.WebAuthn.GetCredentialsRequest]; - returnType: Protocol.WebAuthn.GetCredentialsResponse; - }; - /** - * Removes a credential from the authenticator. - */ - "WebAuthn.removeCredential": { - paramsType: [Protocol.WebAuthn.RemoveCredentialRequest]; - returnType: void; - }; - /** - * Clears all the credentials from the specified device. - */ - "WebAuthn.clearCredentials": { - paramsType: [Protocol.WebAuthn.ClearCredentialsRequest]; - returnType: void; - }; - /** - * Sets whether User Verification succeeds or fails for an authenticator. - * The default is true. - */ - "WebAuthn.setUserVerified": { - paramsType: [Protocol.WebAuthn.SetUserVerifiedRequest]; - returnType: void; - }; - /** - * Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. - * The default is true. - */ - "WebAuthn.setAutomaticPresenceSimulation": { - paramsType: [Protocol.WebAuthn.SetAutomaticPresenceSimulationRequest]; - returnType: void; - }; - /** - * Enables the Media domain - */ - "Media.enable": { - paramsType: []; - returnType: void; - }; - /** - * Disables the Media domain. - */ - "Media.disable": { - paramsType: []; - returnType: void; - }; - } -} - -export default ProtocolMapping; diff --git a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/vendor/devtools-protocol/types/protocol.d.ts b/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/vendor/devtools-protocol/types/protocol.d.ts deleted file mode 100644 index b64c8259577..00000000000 --- a/src/resources/vendor/deno-land/x/puppeteer@9-0-2/vendor/puppeteer-core/vendor/devtools-protocol/types/protocol.d.ts +++ /dev/null @@ -1,14847 +0,0 @@ -/********************************************************************** - * Auto-generated by protocol-dts-generator.ts, do not edit manually. * - **********************************************************************/ - -/** - * The Chrome DevTools Protocol. - * @public - */ -export namespace Protocol { - export type integer = number; - - /** - * This domain is deprecated - use Runtime or Log instead. - */ - export namespace Console { - export const enum ConsoleMessageSource { - XML = "xml", - Javascript = "javascript", - Network = "network", - ConsoleAPI = "console-api", - Storage = "storage", - Appcache = "appcache", - Rendering = "rendering", - Security = "security", - Other = "other", - Deprecation = "deprecation", - Worker = "worker", - } - - export const enum ConsoleMessageLevel { - Log = "log", - Warning = "warning", - Error = "error", - Debug = "debug", - Info = "info", - } - - /** - * Console message. - */ - export interface ConsoleMessage { - /** - * Message source. (ConsoleMessageSource enum) - */ - source: - ( - | "xml" - | "javascript" - | "network" - | "console-api" - | "storage" - | "appcache" - | "rendering" - | "security" - | "other" - | "deprecation" - | "worker" - ); - /** - * Message severity. (ConsoleMessageLevel enum) - */ - level: ("log" | "warning" | "error" | "debug" | "info"); - /** - * Message text. - */ - text: string; - /** - * URL of the message origin. - */ - url?: string; - /** - * Line number in the resource that generated this message (1-based). - */ - line?: integer; - /** - * Column number in the resource that generated this message (1-based). - */ - column?: integer; - } - - /** - * Issued when new console message is added. - */ - export interface MessageAddedEvent { - /** - * Console message that has been added. - */ - message: ConsoleMessage; - } - } - - /** - * Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing - * breakpoints, stepping through execution, exploring stack traces, etc. - */ - export namespace Debugger { - /** - * Breakpoint identifier. - */ - export type BreakpointId = string; - - /** - * Call frame identifier. - */ - export type CallFrameId = string; - - /** - * Location in the source code. - */ - export interface Location { - /** - * Script identifier as reported in the `Debugger.scriptParsed`. - */ - scriptId: Runtime.ScriptId; - /** - * Line number in the script (0-based). - */ - lineNumber: integer; - /** - * Column number in the script (0-based). - */ - columnNumber?: integer; - } - - /** - * Location in the source code. - */ - export interface ScriptPosition { - lineNumber: integer; - columnNumber: integer; - } - - /** - * Location range within one script. - */ - export interface LocationRange { - scriptId: Runtime.ScriptId; - start: ScriptPosition; - end: ScriptPosition; - } - - /** - * JavaScript call frame. Array of call frames form the call stack. - */ - export interface CallFrame { - /** - * Call frame identifier. This identifier is only valid while the virtual machine is paused. - */ - callFrameId: CallFrameId; - /** - * Name of the JavaScript function called on this call frame. - */ - functionName: string; - /** - * Location in the source code. - */ - functionLocation?: Location; - /** - * Location in the source code. - */ - location: Location; - /** - * JavaScript script name or url. - */ - url: string; - /** - * Scope chain for this call frame. - */ - scopeChain: Scope[]; - /** - * `this` object for this call frame. - */ - this: Runtime.RemoteObject; - /** - * The value being returned, if the function is at return point. - */ - returnValue?: Runtime.RemoteObject; - } - - export const enum ScopeType { - Global = "global", - Local = "local", - With = "with", - Closure = "closure", - Catch = "catch", - Block = "block", - Script = "script", - Eval = "eval", - Module = "module", - WasmExpressionStack = "wasm-expression-stack", - } - - /** - * Scope description. - */ - export interface Scope { - /** - * Scope type. (ScopeType enum) - */ - type: - ( - | "global" - | "local" - | "with" - | "closure" - | "catch" - | "block" - | "script" - | "eval" - | "module" - | "wasm-expression-stack" - ); - /** - * Object representing the scope. For `global` and `with` scopes it represents the actual - * object; for the rest of the scopes, it is artificial transient object enumerating scope - * variables as its properties. - */ - object: Runtime.RemoteObject; - name?: string; - /** - * Location in the source code where scope starts - */ - startLocation?: Location; - /** - * Location in the source code where scope ends - */ - endLocation?: Location; - } - - /** - * Search match for resource. - */ - export interface SearchMatch { - /** - * Line number in resource content. - */ - lineNumber: number; - /** - * Line with match content. - */ - lineContent: string; - } - - export const enum BreakLocationType { - DebuggerStatement = "debuggerStatement", - Call = "call", - Return = "return", - } - - export interface BreakLocation { - /** - * Script identifier as reported in the `Debugger.scriptParsed`. - */ - scriptId: Runtime.ScriptId; - /** - * Line number in the script (0-based). - */ - lineNumber: integer; - /** - * Column number in the script (0-based). - */ - columnNumber?: integer; - /** - * (BreakLocationType enum) - */ - type?: ("debuggerStatement" | "call" | "return"); - } - - /** - * Enum of possible script languages. - */ - export type ScriptLanguage = ("JavaScript" | "WebAssembly"); - - export const enum DebugSymbolsType { - None = "None", - SourceMap = "SourceMap", - EmbeddedDWARF = "EmbeddedDWARF", - ExternalDWARF = "ExternalDWARF", - } - - /** - * Debug symbols available for a wasm script. - */ - export interface DebugSymbols { - /** - * Type of the debug symbols. (DebugSymbolsType enum) - */ - type: ("None" | "SourceMap" | "EmbeddedDWARF" | "ExternalDWARF"); - /** - * URL of the external symbol source. - */ - externalURL?: string; - } - - export const enum ContinueToLocationRequestTargetCallFrames { - Any = "any", - Current = "current", - } - - export interface ContinueToLocationRequest { - /** - * Location to continue to. - */ - location: Location; - /** - * (ContinueToLocationRequestTargetCallFrames enum) - */ - targetCallFrames?: ("any" | "current"); - } - - export interface EnableRequest { - /** - * The maximum size in bytes of collected scripts (not referenced by other heap objects) - * the debugger can hold. Puts no limit if paramter is omitted. - */ - maxScriptsCacheSize?: number; - } - - export interface EnableResponse { - /** - * Unique identifier of the debugger. - */ - debuggerId: Runtime.UniqueDebuggerId; - } - - export interface EvaluateOnCallFrameRequest { - /** - * Call frame identifier to evaluate on. - */ - callFrameId: CallFrameId; - /** - * Expression to evaluate. - */ - expression: string; - /** - * String object group name to put result into (allows rapid releasing resulting object handles - * using `releaseObjectGroup`). - */ - objectGroup?: string; - /** - * Specifies whether command line API should be available to the evaluated expression, defaults - * to false. - */ - includeCommandLineAPI?: boolean; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause - * execution. Overrides `setPauseOnException` state. - */ - silent?: boolean; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean; - /** - * Whether to throw an exception if side effect cannot be ruled out during evaluation. - */ - throwOnSideEffect?: boolean; - /** - * Terminate execution after timing out (number of milliseconds). - */ - timeout?: Runtime.TimeDelta; - } - - export interface EvaluateOnCallFrameResponse { - /** - * Object wrapper for the evaluation result. - */ - result: Runtime.RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: Runtime.ExceptionDetails; - } - - export interface ExecuteWasmEvaluatorRequest { - /** - * WebAssembly call frame identifier to evaluate on. - */ - callFrameId: CallFrameId; - /** - * Code of the evaluator module. - */ - evaluator: string; - /** - * Terminate execution after timing out (number of milliseconds). - */ - timeout?: Runtime.TimeDelta; - } - - export interface ExecuteWasmEvaluatorResponse { - /** - * Object wrapper for the evaluation result. - */ - result: Runtime.RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: Runtime.ExceptionDetails; - } - - export interface GetPossibleBreakpointsRequest { - /** - * Start of range to search possible breakpoint locations in. - */ - start: Location; - /** - * End of range to search possible breakpoint locations in (excluding). When not specified, end - * of scripts is used as end of range. - */ - end?: Location; - /** - * Only consider locations which are in the same (non-nested) function as start. - */ - restrictToFunction?: boolean; - } - - export interface GetPossibleBreakpointsResponse { - /** - * List of the possible breakpoint locations. - */ - locations: BreakLocation[]; - } - - export interface GetScriptSourceRequest { - /** - * Id of the script to get source for. - */ - scriptId: Runtime.ScriptId; - } - - export interface GetScriptSourceResponse { - /** - * Script source (empty in case of Wasm bytecode). - */ - scriptSource: string; - /** - * Wasm bytecode. - */ - bytecode?: string; - } - - export interface GetWasmBytecodeRequest { - /** - * Id of the Wasm script to get source for. - */ - scriptId: Runtime.ScriptId; - } - - export interface GetWasmBytecodeResponse { - /** - * Script source. - */ - bytecode: string; - } - - export interface GetStackTraceRequest { - stackTraceId: Runtime.StackTraceId; - } - - export interface GetStackTraceResponse { - stackTrace: Runtime.StackTrace; - } - - export interface PauseOnAsyncCallRequest { - /** - * Debugger will pause when async call with given stack trace is started. - */ - parentStackTraceId: Runtime.StackTraceId; - } - - export interface RemoveBreakpointRequest { - breakpointId: BreakpointId; - } - - export interface RestartFrameRequest { - /** - * Call frame identifier to evaluate on. - */ - callFrameId: CallFrameId; - } - - export interface RestartFrameResponse { - /** - * New stack trace. - */ - callFrames: CallFrame[]; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace; - /** - * Async stack trace, if any. - */ - asyncStackTraceId?: Runtime.StackTraceId; - } - - export interface ResumeRequest { - /** - * Set to true to terminate execution upon resuming execution. In contrast - * to Runtime.terminateExecution, this will allows to execute further - * JavaScript (i.e. via evaluation) until execution of the paused code - * is actually resumed, at which point termination is triggered. - * If execution is currently not paused, this parameter has no effect. - */ - terminateOnResume?: boolean; - } - - export interface SearchInContentRequest { - /** - * Id of the script to search in. - */ - scriptId: Runtime.ScriptId; - /** - * String to search for. - */ - query: string; - /** - * If true, search is case sensitive. - */ - caseSensitive?: boolean; - /** - * If true, treats string parameter as regex. - */ - isRegex?: boolean; - } - - export interface SearchInContentResponse { - /** - * List of search matches. - */ - result: SearchMatch[]; - } - - export interface SetAsyncCallStackDepthRequest { - /** - * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async - * call stacks (default). - */ - maxDepth: integer; - } - - export interface SetBlackboxPatternsRequest { - /** - * Array of regexps that will be used to check script url for blackbox state. - */ - patterns: string[]; - } - - export interface SetBlackboxedRangesRequest { - /** - * Id of the script. - */ - scriptId: Runtime.ScriptId; - positions: ScriptPosition[]; - } - - export interface SetBreakpointRequest { - /** - * Location to set breakpoint in. - */ - location: Location; - /** - * Expression to use as a breakpoint condition. When specified, debugger will only stop on the - * breakpoint if this expression evaluates to true. - */ - condition?: string; - } - - export interface SetBreakpointResponse { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - /** - * Location this breakpoint resolved into. - */ - actualLocation: Location; - } - - export const enum SetInstrumentationBreakpointRequestInstrumentation { - BeforeScriptExecution = "beforeScriptExecution", - BeforeScriptWithSourceMapExecution = "beforeScriptWithSourceMapExecution", - } - - export interface SetInstrumentationBreakpointRequest { - /** - * Instrumentation name. (SetInstrumentationBreakpointRequestInstrumentation enum) - */ - instrumentation: - ("beforeScriptExecution" | "beforeScriptWithSourceMapExecution"); - } - - export interface SetInstrumentationBreakpointResponse { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - } - - export interface SetBreakpointByUrlRequest { - /** - * Line number to set breakpoint at. - */ - lineNumber: integer; - /** - * URL of the resources to set breakpoint on. - */ - url?: string; - /** - * Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or - * `urlRegex` must be specified. - */ - urlRegex?: string; - /** - * Script hash of the resources to set breakpoint on. - */ - scriptHash?: string; - /** - * Offset in the line to set breakpoint at. - */ - columnNumber?: integer; - /** - * Expression to use as a breakpoint condition. When specified, debugger will only stop on the - * breakpoint if this expression evaluates to true. - */ - condition?: string; - } - - export interface SetBreakpointByUrlResponse { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - /** - * List of the locations this breakpoint resolved into upon addition. - */ - locations: Location[]; - } - - export interface SetBreakpointOnFunctionCallRequest { - /** - * Function object id. - */ - objectId: Runtime.RemoteObjectId; - /** - * Expression to use as a breakpoint condition. When specified, debugger will - * stop on the breakpoint if this expression evaluates to true. - */ - condition?: string; - } - - export interface SetBreakpointOnFunctionCallResponse { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - } - - export interface SetBreakpointsActiveRequest { - /** - * New value for breakpoints active state. - */ - active: boolean; - } - - export const enum SetPauseOnExceptionsRequestState { - None = "none", - Uncaught = "uncaught", - All = "all", - } - - export interface SetPauseOnExceptionsRequest { - /** - * Pause on exceptions mode. (SetPauseOnExceptionsRequestState enum) - */ - state: ("none" | "uncaught" | "all"); - } - - export interface SetReturnValueRequest { - /** - * New return value. - */ - newValue: Runtime.CallArgument; - } - - export interface SetScriptSourceRequest { - /** - * Id of the script to edit. - */ - scriptId: Runtime.ScriptId; - /** - * New content of the script. - */ - scriptSource: string; - /** - * If true the change will not actually be applied. Dry run may be used to get result - * description without actually modifying the code. - */ - dryRun?: boolean; - } - - export interface SetScriptSourceResponse { - /** - * New stack trace in case editing has happened while VM was stopped. - */ - callFrames?: CallFrame[]; - /** - * Whether current call stack was modified after applying the changes. - */ - stackChanged?: boolean; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace; - /** - * Async stack trace, if any. - */ - asyncStackTraceId?: Runtime.StackTraceId; - /** - * Exception details if any. - */ - exceptionDetails?: Runtime.ExceptionDetails; - } - - export interface SetSkipAllPausesRequest { - /** - * New value for skip pauses state. - */ - skip: boolean; - } - - export interface SetVariableValueRequest { - /** - * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' - * scope types are allowed. Other scopes could be manipulated manually. - */ - scopeNumber: integer; - /** - * Variable name. - */ - variableName: string; - /** - * New variable value. - */ - newValue: Runtime.CallArgument; - /** - * Id of callframe that holds variable. - */ - callFrameId: CallFrameId; - } - - export interface StepIntoRequest { - /** - * Debugger will pause on the execution of the first async task which was scheduled - * before next pause. - */ - breakOnAsyncCall?: boolean; - /** - * The skipList specifies location ranges that should be skipped on step into. - */ - skipList?: LocationRange[]; - } - - export interface StepOverRequest { - /** - * The skipList specifies location ranges that should be skipped on step over. - */ - skipList?: LocationRange[]; - } - - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - export interface BreakpointResolvedEvent { - /** - * Breakpoint unique identifier. - */ - breakpointId: BreakpointId; - /** - * Actual breakpoint location. - */ - location: Location; - } - - export const enum PausedEventReason { - Ambiguous = "ambiguous", - Assert = "assert", - DebugCommand = "debugCommand", - DOM = "DOM", - EventListener = "EventListener", - Exception = "exception", - Instrumentation = "instrumentation", - OOM = "OOM", - Other = "other", - PromiseRejection = "promiseRejection", - XHR = "XHR", - } - - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - export interface PausedEvent { - /** - * Call stack the virtual machine stopped on. - */ - callFrames: CallFrame[]; - /** - * Pause reason. (PausedEventReason enum) - */ - reason: - ( - | "ambiguous" - | "assert" - | "debugCommand" - | "DOM" - | "EventListener" - | "exception" - | "instrumentation" - | "OOM" - | "other" - | "promiseRejection" - | "XHR" - ); - /** - * Object containing break-specific auxiliary properties. - */ - data?: any; - /** - * Hit breakpoints IDs - */ - hitBreakpoints?: string[]; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace; - /** - * Async stack trace, if any. - */ - asyncStackTraceId?: Runtime.StackTraceId; - /** - * Never present, will be removed. - */ - asyncCallStackTraceId?: Runtime.StackTraceId; - } - - /** - * Fired when virtual machine fails to parse the script. - */ - export interface ScriptFailedToParseEvent { - /** - * Identifier of the script parsed. - */ - scriptId: Runtime.ScriptId; - /** - * URL or name of the script parsed (if any). - */ - url: string; - /** - * Line offset of the script within the resource with given URL (for script tags). - */ - startLine: integer; - /** - * Column offset of the script within the resource with given URL. - */ - startColumn: integer; - /** - * Last line of the script. - */ - endLine: integer; - /** - * Length of the last line of the script. - */ - endColumn: integer; - /** - * Specifies script creation context. - */ - executionContextId: Runtime.ExecutionContextId; - /** - * Content hash of the script. - */ - hash: string; - /** - * Embedder-specific auxiliary data. - */ - executionContextAuxData?: any; - /** - * URL of source map associated with script (if any). - */ - sourceMapURL?: string; - /** - * True, if this script has sourceURL. - */ - hasSourceURL?: boolean; - /** - * True, if this script is ES6 module. - */ - isModule?: boolean; - /** - * This script length. - */ - length?: integer; - /** - * JavaScript top stack frame of where the script parsed event was triggered if available. - */ - stackTrace?: Runtime.StackTrace; - /** - * If the scriptLanguage is WebAssembly, the code section offset in the module. - */ - codeOffset?: integer; - /** - * The language of the script. - */ - scriptLanguage?: Debugger.ScriptLanguage; - /** - * The name the embedder supplied for this script. - */ - embedderName?: string; - } - - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected - * scripts upon enabling debugger. - */ - export interface ScriptParsedEvent { - /** - * Identifier of the script parsed. - */ - scriptId: Runtime.ScriptId; - /** - * URL or name of the script parsed (if any). - */ - url: string; - /** - * Line offset of the script within the resource with given URL (for script tags). - */ - startLine: integer; - /** - * Column offset of the script within the resource with given URL. - */ - startColumn: integer; - /** - * Last line of the script. - */ - endLine: integer; - /** - * Length of the last line of the script. - */ - endColumn: integer; - /** - * Specifies script creation context. - */ - executionContextId: Runtime.ExecutionContextId; - /** - * Content hash of the script. - */ - hash: string; - /** - * Embedder-specific auxiliary data. - */ - executionContextAuxData?: any; - /** - * True, if this script is generated as a result of the live edit operation. - */ - isLiveEdit?: boolean; - /** - * URL of source map associated with script (if any). - */ - sourceMapURL?: string; - /** - * True, if this script has sourceURL. - */ - hasSourceURL?: boolean; - /** - * True, if this script is ES6 module. - */ - isModule?: boolean; - /** - * This script length. - */ - length?: integer; - /** - * JavaScript top stack frame of where the script parsed event was triggered if available. - */ - stackTrace?: Runtime.StackTrace; - /** - * If the scriptLanguage is WebAssembly, the code section offset in the module. - */ - codeOffset?: integer; - /** - * The language of the script. - */ - scriptLanguage?: Debugger.ScriptLanguage; - /** - * If the scriptLanguage is WebASsembly, the source of debug symbols for the module. - */ - debugSymbols?: Debugger.DebugSymbols; - /** - * The name the embedder supplied for this script. - */ - embedderName?: string; - } - } - - export namespace HeapProfiler { - /** - * Heap snapshot object id. - */ - export type HeapSnapshotObjectId = string; - - /** - * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. - */ - export interface SamplingHeapProfileNode { - /** - * Function location. - */ - callFrame: Runtime.CallFrame; - /** - * Allocations size in bytes for the node excluding children. - */ - selfSize: number; - /** - * Node id. Ids are unique across all profiles collected between startSampling and stopSampling. - */ - id: integer; - /** - * Child nodes. - */ - children: SamplingHeapProfileNode[]; - } - - /** - * A single sample from a sampling profile. - */ - export interface SamplingHeapProfileSample { - /** - * Allocation size in bytes attributed to the sample. - */ - size: number; - /** - * Id of the corresponding profile tree node. - */ - nodeId: integer; - /** - * Time-ordered sample ordinal number. It is unique across all profiles retrieved - * between startSampling and stopSampling. - */ - ordinal: number; - } - - /** - * Sampling profile. - */ - export interface SamplingHeapProfile { - head: SamplingHeapProfileNode; - samples: SamplingHeapProfileSample[]; - } - - export interface AddInspectedHeapObjectRequest { - /** - * Heap snapshot object id to be accessible by means of $x command line API. - */ - heapObjectId: HeapSnapshotObjectId; - } - - export interface GetHeapObjectIdRequest { - /** - * Identifier of the object to get heap object id for. - */ - objectId: Runtime.RemoteObjectId; - } - - export interface GetHeapObjectIdResponse { - /** - * Id of the heap snapshot object corresponding to the passed remote object id. - */ - heapSnapshotObjectId: HeapSnapshotObjectId; - } - - export interface GetObjectByHeapObjectIdRequest { - objectId: HeapSnapshotObjectId; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string; - } - - export interface GetObjectByHeapObjectIdResponse { - /** - * Evaluation result. - */ - result: Runtime.RemoteObject; - } - - export interface GetSamplingProfileResponse { - /** - * Return the sampling profile being collected. - */ - profile: SamplingHeapProfile; - } - - export interface StartSamplingRequest { - /** - * Average sample interval in bytes. Poisson distribution is used for the intervals. The - * default value is 32768 bytes. - */ - samplingInterval?: number; - } - - export interface StartTrackingHeapObjectsRequest { - trackAllocations?: boolean; - } - - export interface StopSamplingResponse { - /** - * Recorded sampling heap profile. - */ - profile: SamplingHeapProfile; - } - - export interface StopTrackingHeapObjectsRequest { - /** - * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken - * when the tracking is stopped. - */ - reportProgress?: boolean; - treatGlobalObjectsAsRoots?: boolean; - } - - export interface TakeHeapSnapshotRequest { - /** - * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. - */ - reportProgress?: boolean; - /** - * If true, a raw snapshot without artifical roots will be generated - */ - treatGlobalObjectsAsRoots?: boolean; - } - - export interface AddHeapSnapshotChunkEvent { - chunk: string; - } - - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - export interface HeapStatsUpdateEvent { - /** - * An array of triplets. Each triplet describes a fragment. The first integer is the fragment - * index, the second integer is a total count of objects for the fragment, the third integer is - * a total size of the objects for the fragment. - */ - statsUpdate: integer[]; - } - - /** - * If heap objects tracking has been started then backend regularly sends a current value for last - * seen object id and corresponding timestamp. If the were changes in the heap since last event - * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - export interface LastSeenObjectIdEvent { - lastSeenObjectId: integer; - timestamp: number; - } - - export interface ReportHeapSnapshotProgressEvent { - done: integer; - total: integer; - finished?: boolean; - } - } - - export namespace Profiler { - /** - * Profile node. Holds callsite information, execution statistics and child nodes. - */ - export interface ProfileNode { - /** - * Unique id of the node. - */ - id: integer; - /** - * Function location. - */ - callFrame: Runtime.CallFrame; - /** - * Number of samples where this node was on top of the call stack. - */ - hitCount?: integer; - /** - * Child node ids. - */ - children?: integer[]; - /** - * The reason of being not optimized. The function may be deoptimized or marked as don't - * optimize. - */ - deoptReason?: string; - /** - * An array of source position ticks. - */ - positionTicks?: PositionTickInfo[]; - } - - /** - * Profile. - */ - export interface Profile { - /** - * The list of profile nodes. First item is the root node. - */ - nodes: ProfileNode[]; - /** - * Profiling start timestamp in microseconds. - */ - startTime: number; - /** - * Profiling end timestamp in microseconds. - */ - endTime: number; - /** - * Ids of samples top nodes. - */ - samples?: integer[]; - /** - * Time intervals between adjacent samples in microseconds. The first delta is relative to the - * profile startTime. - */ - timeDeltas?: integer[]; - } - - /** - * Specifies a number of samples attributed to a certain source position. - */ - export interface PositionTickInfo { - /** - * Source line number (1-based). - */ - line: integer; - /** - * Number of samples attributed to the source line. - */ - ticks: integer; - } - - /** - * Coverage data for a source range. - */ - export interface CoverageRange { - /** - * JavaScript script source offset for the range start. - */ - startOffset: integer; - /** - * JavaScript script source offset for the range end. - */ - endOffset: integer; - /** - * Collected execution count of the source range. - */ - count: integer; - } - - /** - * Coverage data for a JavaScript function. - */ - export interface FunctionCoverage { - /** - * JavaScript function name. - */ - functionName: string; - /** - * Source ranges inside the function with coverage data. - */ - ranges: CoverageRange[]; - /** - * Whether coverage data for this function has block granularity. - */ - isBlockCoverage: boolean; - } - - /** - * Coverage data for a JavaScript script. - */ - export interface ScriptCoverage { - /** - * JavaScript script id. - */ - scriptId: Runtime.ScriptId; - /** - * JavaScript script name or url. - */ - url: string; - /** - * Functions contained in the script that has coverage data. - */ - functions: FunctionCoverage[]; - } - - /** - * Describes a type collected during runtime. - */ - export interface TypeObject { - /** - * Name of a type collected with type profiling. - */ - name: string; - } - - /** - * Source offset and types for a parameter or return value. - */ - export interface TypeProfileEntry { - /** - * Source offset of the parameter or end of function for return values. - */ - offset: integer; - /** - * The types for this parameter or return value. - */ - types: TypeObject[]; - } - - /** - * Type profile data collected during runtime for a JavaScript script. - */ - export interface ScriptTypeProfile { - /** - * JavaScript script id. - */ - scriptId: Runtime.ScriptId; - /** - * JavaScript script name or url. - */ - url: string; - /** - * Type profile entries for parameters and return values of the functions in the script. - */ - entries: TypeProfileEntry[]; - } - - /** - * Collected counter information. - */ - export interface CounterInfo { - /** - * Counter name. - */ - name: string; - /** - * Counter value. - */ - value: integer; - } - - /** - * Runtime call counter information. - */ - export interface RuntimeCallCounterInfo { - /** - * Counter name. - */ - name: string; - /** - * Counter value. - */ - value: number; - /** - * Counter time in seconds. - */ - time: number; - } - - export interface GetBestEffortCoverageResponse { - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - } - - export interface SetSamplingIntervalRequest { - /** - * New sampling interval in microseconds. - */ - interval: integer; - } - - export interface StartPreciseCoverageRequest { - /** - * Collect accurate call counts beyond simple 'covered' or 'not covered'. - */ - callCount?: boolean; - /** - * Collect block-based coverage. - */ - detailed?: boolean; - /** - * Allow the backend to send updates on its own initiative - */ - allowTriggeredUpdates?: boolean; - } - - export interface StartPreciseCoverageResponse { - /** - * Monotonically increasing time (in seconds) when the coverage update was taken in the backend. - */ - timestamp: number; - } - - export interface StopResponse { - /** - * Recorded profile. - */ - profile: Profile; - } - - export interface TakePreciseCoverageResponse { - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - /** - * Monotonically increasing time (in seconds) when the coverage update was taken in the backend. - */ - timestamp: number; - } - - export interface TakeTypeProfileResponse { - /** - * Type profile for all scripts since startTypeProfile() was turned on. - */ - result: ScriptTypeProfile[]; - } - - export interface GetCountersResponse { - /** - * Collected counters information. - */ - result: CounterInfo[]; - } - - export interface GetRuntimeCallStatsResponse { - /** - * Collected runtime call counter information. - */ - result: RuntimeCallCounterInfo[]; - } - - export interface ConsoleProfileFinishedEvent { - id: string; - /** - * Location of console.profileEnd(). - */ - location: Debugger.Location; - profile: Profile; - /** - * Profile title passed as an argument to console.profile(). - */ - title?: string; - } - - /** - * Sent when new profile recording is started using console.profile() call. - */ - export interface ConsoleProfileStartedEvent { - id: string; - /** - * Location of console.profile(). - */ - location: Debugger.Location; - /** - * Profile title passed as an argument to console.profile(). - */ - title?: string; - } - - /** - * Reports coverage delta since the last poll (either from an event like this, or from - * `takePreciseCoverage` for the current isolate. May only be sent if precise code - * coverage has been started. This event can be trigged by the embedder to, for example, - * trigger collection of coverage data immediatelly at a certain point in time. - */ - export interface PreciseCoverageDeltaUpdateEvent { - /** - * Monotonically increasing time (in seconds) when the coverage update was taken in the backend. - */ - timestamp: number; - /** - * Identifier for distinguishing coverage events. - */ - occassion: string; - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - } - } - - /** - * Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. - * Evaluation results are returned as mirror object that expose object type, string representation - * and unique identifier that can be used for further object reference. Original objects are - * maintained in memory unless they are either explicitly released or are released along with the - * other objects in their object group. - */ - export namespace Runtime { - /** - * Unique script identifier. - */ - export type ScriptId = string; - - /** - * Unique object identifier. - */ - export type RemoteObjectId = string; - - /** - * Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`, - * `-Infinity`, and bigint literals. - */ - export type UnserializableValue = string; - - export const enum RemoteObjectType { - Object = "object", - Function = "function", - Undefined = "undefined", - String = "string", - Number = "number", - Boolean = "boolean", - Symbol = "symbol", - Bigint = "bigint", - Wasm = "wasm", - } - - export const enum RemoteObjectSubtype { - Array = "array", - Null = "null", - Node = "node", - Regexp = "regexp", - Date = "date", - Map = "map", - Set = "set", - Weakmap = "weakmap", - Weakset = "weakset", - Iterator = "iterator", - Generator = "generator", - Error = "error", - Proxy = "proxy", - Promise = "promise", - Typedarray = "typedarray", - Arraybuffer = "arraybuffer", - Dataview = "dataview", - I32 = "i32", - I64 = "i64", - F32 = "f32", - F64 = "f64", - V128 = "v128", - Externref = "externref", - } - - /** - * Mirror object referencing original JavaScript object. - */ - export interface RemoteObject { - /** - * Object type. (RemoteObjectType enum) - */ - type: - ( - | "object" - | "function" - | "undefined" - | "string" - | "number" - | "boolean" - | "symbol" - | "bigint" - | "wasm" - ); - /** - * Object subtype hint. Specified for `object` or `wasm` type values only. (RemoteObjectSubtype enum) - */ - subtype?: - ( - | "array" - | "null" - | "node" - | "regexp" - | "date" - | "map" - | "set" - | "weakmap" - | "weakset" - | "iterator" - | "generator" - | "error" - | "proxy" - | "promise" - | "typedarray" - | "arraybuffer" - | "dataview" - | "i32" - | "i64" - | "f32" - | "f64" - | "v128" - | "externref" - ); - /** - * Object class (constructor) name. Specified for `object` type values only. - */ - className?: string; - /** - * Remote object value in case of primitive values or JSON values (if it was requested). - */ - value?: any; - /** - * Primitive value which can not be JSON-stringified does not have `value`, but gets this - * property. - */ - unserializableValue?: UnserializableValue; - /** - * String representation of the object. - */ - description?: string; - /** - * Unique object identifier (for non-primitive values). - */ - objectId?: RemoteObjectId; - /** - * Preview containing abbreviated property values. Specified for `object` type values only. - */ - preview?: ObjectPreview; - customPreview?: CustomPreview; - } - - export interface CustomPreview { - /** - * The JSON-stringified result of formatter.header(object, config) call. - * It contains json ML array that represents RemoteObject. - */ - header: string; - /** - * If formatter returns true as a result of formatter.hasBody call then bodyGetterId will - * contain RemoteObjectId for the function that returns result of formatter.body(object, config) call. - * The result value is json ML array. - */ - bodyGetterId?: RemoteObjectId; - } - - export const enum ObjectPreviewType { - Object = "object", - Function = "function", - Undefined = "undefined", - String = "string", - Number = "number", - Boolean = "boolean", - Symbol = "symbol", - Bigint = "bigint", - } - - export const enum ObjectPreviewSubtype { - Array = "array", - Null = "null", - Node = "node", - Regexp = "regexp", - Date = "date", - Map = "map", - Set = "set", - Weakmap = "weakmap", - Weakset = "weakset", - Iterator = "iterator", - Generator = "generator", - Error = "error", - } - - /** - * Object containing abbreviated remote object value. - */ - export interface ObjectPreview { - /** - * Object type. (ObjectPreviewType enum) - */ - type: - ( - | "object" - | "function" - | "undefined" - | "string" - | "number" - | "boolean" - | "symbol" - | "bigint" - ); - /** - * Object subtype hint. Specified for `object` type values only. (ObjectPreviewSubtype enum) - */ - subtype?: - ( - | "array" - | "null" - | "node" - | "regexp" - | "date" - | "map" - | "set" - | "weakmap" - | "weakset" - | "iterator" - | "generator" - | "error" - ); - /** - * String representation of the object. - */ - description?: string; - /** - * True iff some of the properties or entries of the original object did not fit. - */ - overflow: boolean; - /** - * List of the properties. - */ - properties: PropertyPreview[]; - /** - * List of the entries. Specified for `map` and `set` subtype values only. - */ - entries?: EntryPreview[]; - } - - export const enum PropertyPreviewType { - Object = "object", - Function = "function", - Undefined = "undefined", - String = "string", - Number = "number", - Boolean = "boolean", - Symbol = "symbol", - Accessor = "accessor", - Bigint = "bigint", - } - - export const enum PropertyPreviewSubtype { - Array = "array", - Null = "null", - Node = "node", - Regexp = "regexp", - Date = "date", - Map = "map", - Set = "set", - Weakmap = "weakmap", - Weakset = "weakset", - Iterator = "iterator", - Generator = "generator", - Error = "error", - } - - export interface PropertyPreview { - /** - * Property name. - */ - name: string; - /** - * Object type. Accessor means that the property itself is an accessor property. (PropertyPreviewType enum) - */ - type: - ( - | "object" - | "function" - | "undefined" - | "string" - | "number" - | "boolean" - | "symbol" - | "accessor" - | "bigint" - ); - /** - * User-friendly property value string. - */ - value?: string; - /** - * Nested value preview. - */ - valuePreview?: ObjectPreview; - /** - * Object subtype hint. Specified for `object` type values only. (PropertyPreviewSubtype enum) - */ - subtype?: - ( - | "array" - | "null" - | "node" - | "regexp" - | "date" - | "map" - | "set" - | "weakmap" - | "weakset" - | "iterator" - | "generator" - | "error" - ); - } - - export interface EntryPreview { - /** - * Preview of the key. Specified for map-like collection entries. - */ - key?: ObjectPreview; - /** - * Preview of the value. - */ - value: ObjectPreview; - } - - /** - * Object property descriptor. - */ - export interface PropertyDescriptor { - /** - * Property name or symbol description. - */ - name: string; - /** - * The value associated with the property. - */ - value?: RemoteObject; - /** - * True if the value associated with the property may be changed (data descriptors only). - */ - writable?: boolean; - /** - * A function which serves as a getter for the property, or `undefined` if there is no getter - * (accessor descriptors only). - */ - get?: RemoteObject; - /** - * A function which serves as a setter for the property, or `undefined` if there is no setter - * (accessor descriptors only). - */ - set?: RemoteObject; - /** - * True if the type of this property descriptor may be changed and if the property may be - * deleted from the corresponding object. - */ - configurable: boolean; - /** - * True if this property shows up during enumeration of the properties on the corresponding - * object. - */ - enumerable: boolean; - /** - * True if the result was thrown during the evaluation. - */ - wasThrown?: boolean; - /** - * True if the property is owned for the object. - */ - isOwn?: boolean; - /** - * Property symbol object, if the property is of the `symbol` type. - */ - symbol?: RemoteObject; - } - - /** - * Object internal property descriptor. This property isn't normally visible in JavaScript code. - */ - export interface InternalPropertyDescriptor { - /** - * Conventional property name. - */ - name: string; - /** - * The value associated with the property. - */ - value?: RemoteObject; - } - - /** - * Object private field descriptor. - */ - export interface PrivatePropertyDescriptor { - /** - * Private property name. - */ - name: string; - /** - * The value associated with the private property. - */ - value?: RemoteObject; - /** - * A function which serves as a getter for the private property, - * or `undefined` if there is no getter (accessor descriptors only). - */ - get?: RemoteObject; - /** - * A function which serves as a setter for the private property, - * or `undefined` if there is no setter (accessor descriptors only). - */ - set?: RemoteObject; - } - - /** - * Represents function call argument. Either remote object id `objectId`, primitive `value`, - * unserializable primitive value or neither of (for undefined) them should be specified. - */ - export interface CallArgument { - /** - * Primitive value or serializable javascript object. - */ - value?: any; - /** - * Primitive value which can not be JSON-stringified. - */ - unserializableValue?: UnserializableValue; - /** - * Remote object handle. - */ - objectId?: RemoteObjectId; - } - - /** - * Id of an execution context. - */ - export type ExecutionContextId = integer; - - /** - * Description of an isolated world. - */ - export interface ExecutionContextDescription { - /** - * Unique id of the execution context. It can be used to specify in which execution context - * script evaluation should be performed. - */ - id: ExecutionContextId; - /** - * Execution context origin. - */ - origin: string; - /** - * Human readable name describing given context. - */ - name: string; - /** - * Embedder-specific auxiliary data. - */ - auxData?: any; - } - - /** - * Detailed information about exception (or error) that was thrown during script compilation or - * execution. - */ - export interface ExceptionDetails { - /** - * Exception id. - */ - exceptionId: integer; - /** - * Exception text, which should be used together with exception object when available. - */ - text: string; - /** - * Line number of the exception location (0-based). - */ - lineNumber: integer; - /** - * Column number of the exception location (0-based). - */ - columnNumber: integer; - /** - * Script ID of the exception location. - */ - scriptId?: ScriptId; - /** - * URL of the exception location, to be used when the script was not reported. - */ - url?: string; - /** - * JavaScript stack trace if available. - */ - stackTrace?: StackTrace; - /** - * Exception object if available. - */ - exception?: RemoteObject; - /** - * Identifier of the context where exception happened. - */ - executionContextId?: ExecutionContextId; - } - - /** - * Number of milliseconds since epoch. - */ - export type Timestamp = number; - - /** - * Number of milliseconds. - */ - export type TimeDelta = number; - - /** - * Stack entry for runtime errors and assertions. - */ - export interface CallFrame { - /** - * JavaScript function name. - */ - functionName: string; - /** - * JavaScript script id. - */ - scriptId: ScriptId; - /** - * JavaScript script name or url. - */ - url: string; - /** - * JavaScript script line number (0-based). - */ - lineNumber: integer; - /** - * JavaScript script column number (0-based). - */ - columnNumber: integer; - } - - /** - * Call frames for assertions or error messages. - */ - export interface StackTrace { - /** - * String label of this stack trace. For async traces this may be a name of the function that - * initiated the async call. - */ - description?: string; - /** - * JavaScript function name. - */ - callFrames: CallFrame[]; - /** - * Asynchronous JavaScript stack trace that preceded this stack, if available. - */ - parent?: StackTrace; - /** - * Asynchronous JavaScript stack trace that preceded this stack, if available. - */ - parentId?: StackTraceId; - } - - /** - * Unique identifier of current debugger. - */ - export type UniqueDebuggerId = string; - - /** - * If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This - * allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages. - */ - export interface StackTraceId { - id: string; - debuggerId?: UniqueDebuggerId; - } - - export interface AwaitPromiseRequest { - /** - * Identifier of the promise. - */ - promiseObjectId: RemoteObjectId; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean; - } - - export interface AwaitPromiseResponse { - /** - * Promise result. Will contain rejected value if promise was rejected. - */ - result: RemoteObject; - /** - * Exception details if stack strace is available. - */ - exceptionDetails?: ExceptionDetails; - } - - export interface CallFunctionOnRequest { - /** - * Declaration of the function to call. - */ - functionDeclaration: string; - /** - * Identifier of the object to call function on. Either objectId or executionContextId should - * be specified. - */ - objectId?: RemoteObjectId; - /** - * Call arguments. All call arguments must belong to the same JavaScript world as the target - * object. - */ - arguments?: CallArgument[]; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause - * execution. Overrides `setPauseOnException` state. - */ - silent?: boolean; - /** - * Whether the result is expected to be a JSON object which should be sent by value. - */ - returnByValue?: boolean; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean; - /** - * Whether execution should be treated as initiated by user in the UI. - */ - userGesture?: boolean; - /** - * Whether execution should `await` for resulting value and return once awaited promise is - * resolved. - */ - awaitPromise?: boolean; - /** - * Specifies execution context which global object will be used to call function on. Either - * executionContextId or objectId should be specified. - */ - executionContextId?: ExecutionContextId; - /** - * Symbolic group name that can be used to release multiple objects. If objectGroup is not - * specified and objectId is, objectGroup will be inherited from object. - */ - objectGroup?: string; - } - - export interface CallFunctionOnResponse { - /** - * Call result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails; - } - - export interface CompileScriptRequest { - /** - * Expression to compile. - */ - expression: string; - /** - * Source url to be set for the script. - */ - sourceURL: string; - /** - * Specifies whether the compiled script should be persisted. - */ - persistScript: boolean; - /** - * Specifies in which execution context to perform script run. If the parameter is omitted the - * evaluation will be performed in the context of the inspected page. - */ - executionContextId?: ExecutionContextId; - } - - export interface CompileScriptResponse { - /** - * Id of the script. - */ - scriptId?: ScriptId; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails; - } - - export interface EvaluateRequest { - /** - * Expression to evaluate. - */ - expression: string; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string; - /** - * Determines whether Command Line API should be available during the evaluation. - */ - includeCommandLineAPI?: boolean; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause - * execution. Overrides `setPauseOnException` state. - */ - silent?: boolean; - /** - * Specifies in which execution context to perform evaluation. If the parameter is omitted the - * evaluation will be performed in the context of the inspected page. - */ - contextId?: ExecutionContextId; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean; - /** - * Whether execution should be treated as initiated by user in the UI. - */ - userGesture?: boolean; - /** - * Whether execution should `await` for resulting value and return once awaited promise is - * resolved. - */ - awaitPromise?: boolean; - /** - * Whether to throw an exception if side effect cannot be ruled out during evaluation. - * This implies `disableBreaks` below. - */ - throwOnSideEffect?: boolean; - /** - * Terminate execution after timing out (number of milliseconds). - */ - timeout?: TimeDelta; - /** - * Disable breakpoints during execution. - */ - disableBreaks?: boolean; - /** - * Setting this flag to true enables `let` re-declaration and top-level `await`. - * Note that `let` variables can only be re-declared if they originate from - * `replMode` themselves. - */ - replMode?: boolean; - /** - * The Content Security Policy (CSP) for the target might block 'unsafe-eval' - * which includes eval(), Function(), setTimeout() and setInterval() - * when called with non-callable arguments. This flag bypasses CSP for this - * evaluation and allows unsafe-eval. Defaults to true. - */ - allowUnsafeEvalBlockedByCSP?: boolean; - } - - export interface EvaluateResponse { - /** - * Evaluation result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails; - } - - export interface GetIsolateIdResponse { - /** - * The isolate id. - */ - id: string; - } - - export interface GetHeapUsageResponse { - /** - * Used heap size in bytes. - */ - usedSize: number; - /** - * Allocated heap size in bytes. - */ - totalSize: number; - } - - export interface GetPropertiesRequest { - /** - * Identifier of the object to return properties for. - */ - objectId: RemoteObjectId; - /** - * If true, returns properties belonging only to the element itself, not to its prototype - * chain. - */ - ownProperties?: boolean; - /** - * If true, returns accessor properties (with getter/setter) only; internal properties are not - * returned either. - */ - accessorPropertiesOnly?: boolean; - /** - * Whether preview should be generated for the results. - */ - generatePreview?: boolean; - } - - export interface GetPropertiesResponse { - /** - * Object properties. - */ - result: PropertyDescriptor[]; - /** - * Internal object properties (only of the element itself). - */ - internalProperties?: InternalPropertyDescriptor[]; - /** - * Object private properties. - */ - privateProperties?: PrivatePropertyDescriptor[]; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails; - } - - export interface GlobalLexicalScopeNamesRequest { - /** - * Specifies in which execution context to lookup global scope variables. - */ - executionContextId?: ExecutionContextId; - } - - export interface GlobalLexicalScopeNamesResponse { - names: string[]; - } - - export interface QueryObjectsRequest { - /** - * Identifier of the prototype to return objects for. - */ - prototypeObjectId: RemoteObjectId; - /** - * Symbolic group name that can be used to release the results. - */ - objectGroup?: string; - } - - export interface QueryObjectsResponse { - /** - * Array with objects. - */ - objects: RemoteObject; - } - - export interface ReleaseObjectRequest { - /** - * Identifier of the object to release. - */ - objectId: RemoteObjectId; - } - - export interface ReleaseObjectGroupRequest { - /** - * Symbolic object group name. - */ - objectGroup: string; - } - - export interface RunScriptRequest { - /** - * Id of the script to run. - */ - scriptId: ScriptId; - /** - * Specifies in which execution context to perform script run. If the parameter is omitted the - * evaluation will be performed in the context of the inspected page. - */ - executionContextId?: ExecutionContextId; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause - * execution. Overrides `setPauseOnException` state. - */ - silent?: boolean; - /** - * Determines whether Command Line API should be available during the evaluation. - */ - includeCommandLineAPI?: boolean; - /** - * Whether the result is expected to be a JSON object which should be sent by value. - */ - returnByValue?: boolean; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean; - /** - * Whether execution should `await` for resulting value and return once awaited promise is - * resolved. - */ - awaitPromise?: boolean; - } - - export interface RunScriptResponse { - /** - * Run result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails; - } - - export interface SetAsyncCallStackDepthRequest { - /** - * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async - * call stacks (default). - */ - maxDepth: integer; - } - - export interface SetCustomObjectFormatterEnabledRequest { - enabled: boolean; - } - - export interface SetMaxCallStackSizeToCaptureRequest { - size: integer; - } - - export interface AddBindingRequest { - name: string; - executionContextId?: ExecutionContextId; - } - - export interface RemoveBindingRequest { - name: string; - } - - /** - * Notification is issued every time when binding is called. - */ - export interface BindingCalledEvent { - name: string; - payload: string; - /** - * Identifier of the context where the call was made. - */ - executionContextId: ExecutionContextId; - } - - export const enum ConsoleAPICalledEventType { - Log = "log", - Debug = "debug", - Info = "info", - Error = "error", - Warning = "warning", - Dir = "dir", - DirXML = "dirxml", - Table = "table", - Trace = "trace", - Clear = "clear", - StartGroup = "startGroup", - StartGroupCollapsed = "startGroupCollapsed", - EndGroup = "endGroup", - Assert = "assert", - Profile = "profile", - ProfileEnd = "profileEnd", - Count = "count", - TimeEnd = "timeEnd", - } - - /** - * Issued when console API was called. - */ - export interface ConsoleAPICalledEvent { - /** - * Type of the call. (ConsoleAPICalledEventType enum) - */ - type: - ( - | "log" - | "debug" - | "info" - | "error" - | "warning" - | "dir" - | "dirxml" - | "table" - | "trace" - | "clear" - | "startGroup" - | "startGroupCollapsed" - | "endGroup" - | "assert" - | "profile" - | "profileEnd" - | "count" - | "timeEnd" - ); - /** - * Call arguments. - */ - args: RemoteObject[]; - /** - * Identifier of the context where the call was made. - */ - executionContextId: ExecutionContextId; - /** - * Call timestamp. - */ - timestamp: Timestamp; - /** - * Stack trace captured when the call was made. The async stack chain is automatically reported for - * the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call - * chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field. - */ - stackTrace?: StackTrace; - /** - * Console context descriptor for calls on non-default console context (not console.*): - * 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call - * on named context. - */ - context?: string; - } - - /** - * Issued when unhandled exception was revoked. - */ - export interface ExceptionRevokedEvent { - /** - * Reason describing why exception was revoked. - */ - reason: string; - /** - * The id of revoked exception, as reported in `exceptionThrown`. - */ - exceptionId: integer; - } - - /** - * Issued when exception was thrown and unhandled. - */ - export interface ExceptionThrownEvent { - /** - * Timestamp of the exception. - */ - timestamp: Timestamp; - exceptionDetails: ExceptionDetails; - } - - /** - * Issued when new execution context is created. - */ - export interface ExecutionContextCreatedEvent { - /** - * A newly created execution context. - */ - context: ExecutionContextDescription; - } - - /** - * Issued when execution context is destroyed. - */ - export interface ExecutionContextDestroyedEvent { - /** - * Id of the destroyed context - */ - executionContextId: ExecutionContextId; - } - - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API - * call). - */ - export interface InspectRequestedEvent { - object: RemoteObject; - hints: any; - } - } - - /** - * This domain is deprecated. - */ - export namespace Schema { - /** - * Description of the protocol domain. - */ - export interface Domain { - /** - * Domain name. - */ - name: string; - /** - * Domain version. - */ - version: string; - } - - export interface GetDomainsResponse { - /** - * List of supported domains. - */ - domains: Domain[]; - } - } - - export namespace Accessibility { - /** - * Unique accessibility node identifier. - */ - export type AXNodeId = string; - - /** - * Enum of possible property types. - */ - export type AXValueType = ( - | "boolean" - | "tristate" - | "booleanOrUndefined" - | "idref" - | "idrefList" - | "integer" - | "node" - | "nodeList" - | "number" - | "string" - | "computedString" - | "token" - | "tokenList" - | "domRelation" - | "role" - | "internalRole" - | "valueUndefined" - ); - - /** - * Enum of possible property sources. - */ - export type AXValueSourceType = ( - | "attribute" - | "implicit" - | "style" - | "contents" - | "placeholder" - | "relatedElement" - ); - - /** - * Enum of possible native property sources (as a subtype of a particular AXValueSourceType). - */ - export type AXValueNativeSourceType = ( - | "figcaption" - | "label" - | "labelfor" - | "labelwrapped" - | "legend" - | "tablecaption" - | "title" - | "other" - ); - - /** - * A single source for a computed AX property. - */ - export interface AXValueSource { - /** - * What type of source this is. - */ - type: AXValueSourceType; - /** - * The value of this property source. - */ - value?: AXValue; - /** - * The name of the relevant attribute, if any. - */ - attribute?: string; - /** - * The value of the relevant attribute, if any. - */ - attributeValue?: AXValue; - /** - * Whether this source is superseded by a higher priority source. - */ - superseded?: boolean; - /** - * The native markup source for this value, e.g. a